> For the complete documentation index, see [llms.txt](https://awsarch.adot8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://awsarch.adot8.com/module-11.md).

# Module 11

### Risks for manual processes

* Doesn't support repeatability at scale
* Doesn't have version control
* Lacks audit trails
* has inconsistency configurations

### Infrastructure as Code is the wave

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FB4mBvi0Oq4xSd1Uh93Zq%2Fimage.png?alt=media&amp;token=091c7a92-086c-4655-bb43-01e93a49b0a7" alt=""><figcaption></figcaption></figure>

* Rapidly deploy complex environments with configuration consistency
* Propagate a change to all stacks by modifying the template
* Clean up by deleting the stack, which deletes the resources created
* The key benefits are reusability, repeatability, and maintainability

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2Fq8m513ZLiI5cYwCflejZ%2Fimage.png?alt=media&amp;token=37a915f2-242d-4685-b7d9-5593e51f9059" alt=""><figcaption></figcaption></figure>

### CloudFormation

* Provides a simplified way to model, create, and manage a collection of AWS resources
* A collection of resources is called a CloudFormation stack.
* There is no extra charge (pay for only the resources that you create).
* Can create, update, and delete stacks
* Enables orderly and predictable provisioning and updating of resources
* Enables version control of AWS resource deployments

#### AWS IaC services that use CloudFormation

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2Fj0hMrrTZM7XWcvpRkM4m%2Fimage.png?alt=media&amp;token=cb0874ae-58b4-402e-acda-c93d9c4c6e6f" alt=""><figcaption></figcaption></figure>

#### How it works

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FbXquuFIjjvHtb9wYCpsP%2Fimage.png?alt=media&amp;token=c4ce04cf-db2f-4e70-919b-a9bc48026eae" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
CloudFormation files can be written in YAML and JSON
{% endhint %}

#### Template components

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FwoWK5brMVulCkwETYdDn%2Fimage.png?alt=media&amp;token=0d0b6df3-012c-4e36-8675-8ffbc7ec7c10" alt=""><figcaption></figcaption></figure>

* You can use the same CloudFormation template to create both your production environment and development environment.

#### CloudFormation change sets

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FRjwLEdWyO6UqRjNiIkac%2Fimage.png?alt=media&amp;token=d386ec45-3d79-4e2a-9f0e-6642eefe5264" alt=""><figcaption></figcaption></figure>

* One way to update a stack (and thus update your AWS resources) is to update the CloudFormation template that you used to create the stack and then run the Update Stack option
* With **Change Sets,** you can preview the changes, verify that they align with your expectations, and then approve the updates before you proceed
* Templates can be organized as:
  * Frontend services
  * Backend services
  * Shared services
  * Network
  * Security

### AWS Quick Starts <img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FbdSdiTQn7Pt605UsZ4IG%2Fimage.png?alt=media&amp;token=bd652aaa-ce83-4592-a458-6c9f2899b1a1" alt="" data-size="line">

* Are gold-standard deployments•Are based on AWS best practices for security and high availability
* Can be used to create entire architectures in less than an hour
* Can be used for experimentation and as the basis for your own architectures

{% hint style="info" %}
Each Quick Start consists of a CloudFormation template and a deployment guide.

It provides details about deployment options and how to configure the deployment to match your needs.
{% endhint %}

### CodeWhisperer

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2F2PHmPemduQLREx0drXMh%2Fimage.png?alt=media&amp;token=fd8e08af-d55a-49e1-87e8-87f46e4626db" alt=""><figcaption></figcaption></figure>

* Just AI to help you when coding
* Is an artificial intelligence (AI)-powered code generator for integrated development environments (IDEs) and code editors
* Works with your favorite programming language and IDE
* Generates code suggestions in real-time within your IDE
* Identifies hard-to-find vulnerabilities•References multiple standards and best practices
