# AWS Declarative Provision via scripts & templates

Part of [Cloud Native zone Provision](/CloudNativeZone/cnz-provision) 

## Requirements

Install [Python](https://es.wikipedia.org/wiki/Python) 

For [Ubuntu](https://ubuntu.com/)

```bash
sudo apt install wget build-essential libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

sudo add-apt-repository ppa:deadsnakes/ppa

sudo apt install python3.13
sudo apt-get -y install python3-pip

```

Install [Jinja2 engine](https://jinja.palletsprojects.com/en/3.1.x/)

```python
pip3 install Jinja2
```

Install [Python YAML](https://pypi.org/project/PyYAML/)

```python
pip3 install PyYAML
```

[Install YQ](https://github.com/mikefarah/yq/#install)

[Install JQ](https://jqlang.github.io/jq/download/)

```bash
apt install jq
```

## How To

- For private network ID in same **zone/region**, for example:

```bash
```

- Complete a **settings.yaml** using [setttings.yaml](settings.yaml) file as model (vars and values are commented as help)

- Use command [on_aws_server](on_aws_server)  

> **on_aws_server** will use [parsertemplate.py]([parsertemplate.py) to load **settings.yaml** as data
> It will generate [aws CLI](https://aws.amazon.com/cli/) commands to create resources

## References

[YAML org](https://yaml.org/)

[YQ](https://github.com/mikefarah/yq)

[YQ Documentation](https://mikefarah.gitbook.io/yq/)

[Jinja2 Tempalte engine](https://jinja.palletsprojects.com/en/3.1.x/)

