Saturday, December 30, 2023

AWSCertCP: Amazon Tool Type : Command Line Tools

  

AWS Command Line Interface: 

-------------------------------------

The AWS Command Line Interface (AWS CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.


Usage is something like this


 aws ec2 describe-instances

 aws ec2 start-instances --instance-ids i-1348636c

 aws sns publish --topic-arn arn:aws:sns:us-east-1:546419318123:OperationsError --message "Script Failure"

 aws sqs receive-message --queue-url https://queue.amazonaws.com/546419318123/Test

 aws help

 aws autoscaling help

 aws autoscaling create-auto-scaling-group help

 aws s3 ls s3://mybucket



AWS Tools for PowerShell

------------------------

The AWS Tools for PowerShell let developers and administrators manage their AWS services and resources in the PowerShell scripting environment. Now you can manage your AWS resources with the same PowerShell tools you use to manage your Windows, Linux, and MacOS environments.


The AWS Tools for PowerShell lets you perform many of the same actions available in the AWS SDK for .NET. You can use it from the command line for quick tasks, like controlling your Amazon EC2 instances.


PS C:\> Start-EC2Instance -InstanceIds i-10a64379

The PowerShell scripting language lets you compose scripts to automate your AWS service management. The following example loops through a log directory on an EC2 instance, finds files older than one week, and then archives any non-empty ones to Amazon S3 before deleting the old log file from disk.


Lastly, with direct access to AWS services from PowerShell, your management scripts can now take advantage of everything the AWS cloud has to offer.


EC2 AMI tools

-------------

You can use the AMI tools to create and manage instance store-backed Linux AMIs. To use the tools, you must install them on your Linux instance. The AMI tools are available as both an RPM and as a .zip file for Linux distributions that don't support RPM.


ec2-ami-tools-version


Elastic Beanstalk environments with the EB CLI

----------------------------------------------

After installing the EB CLI and configuring your project directory, you are ready to create an Elastic Beanstalk environment using the EB CLI, deploy source and configuration updates, and pull logs and events.


Eb create

Eb status

Eb health

Eb events

Eb logs

Eb open

Eb deploy

Eb config

Eb terminate


ECS command line interface

---------------------------

The Amazon Elastic Container Service (Amazon ECS) command line interface (CLI) provides high-level commands to simplify creating, updating, and monitoring clusters and tasks from a local development environment. The Amazon ECS CLI supports Docker Compose files, a popular open-source specification for defining and running multi-container applications. Use the ECS CLI as part of your everyday development and testing cycle as an alternative to the AWS Management Console.


The latest version of the Amazon ECS CLI only supports the major versions of Docker Compose file syntax versions 1, 2, and 3. The version specified in the compose file must be the string "1", "1.0", "2", "2.0", "3", or "3.0". Docker Compose minor versions are not supported.


ecs-cli --version


ecs-cli configure profile --profile-name profile_name --access-key $AWS_ACCESS_KEY_ID --secret-key $AWS_SECRET_ACCESS_KEY


ecs-cli configure --cluster cluster_name --default-launch-type launch_type --region region_name --config-name configuration_name



AWS Amplify CLI

----------------

Amplify Studio allows you to use all the Amplify CLI's features without the need to configure it with AWS Identity and Access Management (IAM). Changes made in Amplify Studio can be made available in the CLI by running the amplify pull command. Similarly, CLI changes to the data model or auth will be visible in Amplify Studio. For all other categories, Studio provides links to the relevant service consoles in AWS.


npm install -g @aws-amplify/cli

amplify add storage

amplify push



AWS SAM CLI

------------

The AWS Serverless Application Model (SAM) CLI is an open-source CLI tool that helps you develop serverless applications containing Lambda functions, Step Functions, API Gateway, EventBridge, SQS, SNS and more. Some of the features it provides are:


Initialize serverless applications in minutes with AWS-provided infrastructure templates with sam init

Compile, build, and package Lambda functions with provided runtimes and with custom Makefile workflows, for zip and image types of Lambda functions with sam build

Locally test a Lambda function and API Gateway easily in a Docker container with sam local commands on SAM and CDK applications

Sync and test your changes in the cloud with sam sync in your developer environments

Deploy your SAM and CloudFormation templates using sam deploy

Quickly create pipelines with prebuilt templates with popular CI/CD systems using sam pipeline init

Tail CloudWatch logs and X-Ray traces with sam logs and sam traces


AWS Copilot command line interface

----------------------------------


The AWS Copilot command line interface (CLI) commands simplify building, releasing, and operating production-ready containerized applications on Amazon ECS from a local development environment. The AWS Copilot CLI aligns with developer workflows that support modern application best practices: from using infrastructure as code to creating a CI/CD pipeline provisioned on behalf of a user. Use the AWS Copilot CLI as part of your everyday development and testing cycle as an alternative to the AWS Management Console.


AWS Copilot currently supports Linux, macOS, and Windows systems.




References:

https://aws.amazon.com/developer/tools/

No comments:

Post a Comment