← Back to CLIs
Melvynx

aws

AWS CLI - manage S3, EC2, Lambda, IAM, CloudFormation and other AWS services. Use when user mentions 'aws', 'amazon web services', 's3', 'ec2', 'lambda', or wants to interact with AWS.

Install

$ npx api2cli install aws

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

aws

Setup

brew install awscli

Verify installation:

aws --version

Use --output json for machine-readable output.

Authentication

aws configure

Verify identity:

aws sts get-caller-identity

Resources

S3

CommandDescription
aws s3 lsList all buckets
aws s3 ls s3://<bucket>List objects in a bucket
aws s3 ls s3://<bucket>/<prefix>/ --recursiveList all objects with a prefix
aws s3 cp <file> s3://<bucket>/Upload a file to S3
aws s3 cp s3://<bucket>/<key> <file>Download a file from S3
aws s3 sync . s3://<bucket>/Sync local directory to S3
aws s3 sync s3://<bucket>/ .Sync S3 to local directory
aws s3 rm s3://<bucket>/<key>Delete an object
aws s3 mb s3://<bucket>Create a bucket
aws s3 rb s3://<bucket> --forceDelete a bucket and its contents

EC2

CommandDescription
aws ec2 describe-instancesList all EC2 instances
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"List running instances
aws ec2 start-instances --instance-ids <id>Start an instance
aws ec2 stop-instances --instance-ids <id>Stop an instance
aws ec2 terminate-instances --instance-ids <id>Terminate an instance
aws ec2 describe-security-groupsList security groups

Lambda

CommandDescription
aws lambda list-functionsList all Lambda functions
aws lambda invoke --function-name <name> output.jsonInvoke a function
aws lambda invoke --function-name <name> --payload '{"key":"value"}' output.jsonInvoke with payload
aws lambda get-function --function-name <name>Get function details
aws lambda update-function-code --function-name <name> --zip-file fileb://function.zipUpdate function code
aws lambda list-event-source-mappingsList event source mappings

IAM

CommandDescription
aws iam list-usersList all IAM users
aws iam list-rolesList all IAM roles
aws iam list-policies --scope LocalList custom policies
aws iam get-userGet current user details
aws iam create-user --user-name <name>Create a user

CloudFormation

CommandDescription
aws cloudformation deploy --template-file template.yaml --stack-name <name>Deploy a stack
aws cloudformation describe-stacksList all stacks
aws cloudformation describe-stack-events --stack-name <name>View stack events
aws cloudformation delete-stack --stack-name <name>Delete a stack

STS

CommandDescription
aws sts get-caller-identityShow current identity
aws sts assume-role --role-arn <arn> --role-session-name <name>Assume an IAM role

Global Flags

FlagDescription
--output jsonOutput as JSON
--output tableOutput as table
--output textOutput as plain text
--region <region>Specify AWS region
--profile <name>Use a named profile
--query <expression>JMESPath query for filtering output
--no-paginateDisable pagination
Sponsors