AWS
Amazon Web Services (AWS) provides on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered, pay-as-you-go basis.
Index
Install
Install the aws
command-line tool.
General
Check version.
aws --version
Configure.
aws configure
Login with SSO.
aws configure sso
aws sso login
List services.
aws list-services
Cognito
List user pools.
aws cognito-idp list-user-pools --max-results 10
DynamoDB
Scan table.
aws dynamodb scan --table-name "<table>"
Get item.
aws dynamodb get-item --table-name "<table>" --key '{\"<key>\": {\"S\": \"<value>\"}}'
Update item.
aws dynamodb update-item --table-name "<table>"
--key '{\"<key>\": {\"S\": \"<value>\"}}'
--update-expression "SET #Name = :value"
--expression-attribute-names '{\"#Name\": \"<attribute_name>\"}'
--expression-attribute-values '{\":value\": {\"<attribute_type>\": \"<args.attribute_value>\"}}'
Delete item.
aws dynamodb delete-item --table-name "<table>" --key '{\"<key>\": {\"S\": \"<value>\"}}'
SES
Send email command input.
{
"FromEmailAddress": "from@email.com",
"Destination": {
"ToAddresses": [ "to@email.com" ]
}
"Content": {
"Simple": {
"Subject": {
"Charset": "utf-8",
"Data": "The subject"
},
"Body": {
"Text": {
"Charset": "utf-8",
"Data": "The body"
}
}
}
}
}
S3
List buckets.
aws s3 ls
Download bucket.
aws s3 sync <uri> <local_path>
aws s3 sync s3://<name> <local_path>
aws s3 sync s3://<path> <local_path>