AWS: CLI, CloudShell and CloudFormation

aws CLI

To install aws CLI you can simply download and install it. Alternatively you can simply run command < msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi > or command

<msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi /qn > for silent installation in windows.

Note: Make sure you are installing the latest version aws CLI.

How to setup aws CLI

  1. Select the ‘Security Credentials’ from the drop down button under your account.

2. Generate access key.

Note: You can use either aws CloudShell (browser based) or aws CLI machine/laptop/computer based.

Accept and click next. Now you can download your keys.

Setup your aws CLI account.

AWS CLI doucumnets.

AWS CLI Command Reference — AWS CLI 1.33.18 Command Reference (amazon.com)

aws cli is full of features and you can take help.

Create s3 bucket “test-sanja-shonak-939rota” in “us-east-1” region.

You can see it

aws CloudShell

In order to use the CloudShel just click the ‘shell’ icon and it will launch a linux terminal.

Note: In CloudShell you don’t need to configure the keys.

ls -l /usr/local/bin

Documents about CloudShell. AWS CloudShell Documentation (amazon.com)

Deleting s3 buckets created during this test.

aws CloudFormation

aws CloudFormation introduction from aws.

  1. Code your infrastructure using the CloudFormation template language in the YAML or JSON format, or start from many available sample templates.
  2. Use AWS CloudFormation via the browser console, command line tools, or APIs to create a stack based on your template code.
  3. AWS CloudFormation provisions and configures the stacks and resources you specified in your template.

Benefits and features

IaC generator

Assist developers in deploying their applications by generating CloudFormation templates for AWS and third-party resources provisioned in AWS.

Stacks

A stack is a collection of AWS resources that you can manage as a single unit. All the resources in a stack are defined by the stack’s AWS CloudFormation template

Application Composer– new

Application Composer helps you visually design and edit your stacks with simple drag-and-drop editor, built-in Step Functions Workflow Studio, and drag-and-drop integrations between services.Learn more 

Build your template

Change sets

Change sets allow you to preview how proposed changes to a stack might impact your running resources, making changes to your stack only when you decide

Learn more 

Template linting and policy-as-code

Check resource properties and values you describe in your templates against the AWS CloudFormation resource specification . Validate your templates for policy compliance against rules you create.

Learn more on cfn-lint  and cfn-guard .

StackSets

StackSets enables you to create, update, or delete stacks across multiple accounts and regions with a single operation.

CloudFormation Public Registry

Discover, provision, and manage third-party resource types and modules published by AWS Partner Network (APN) Partners and the developer community. Registry: Public extensions

Posted in AWS

Leave a Reply

Your email address will not be published. Required fields are marked *