Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

AWS

1. AWS CLI

1.1. Retrieve solution stack names from ListAvailableSolutionStacks API

aws elasticbeanstalk list-available-solution-stacks

Ref: Elastic Beanstalk supported platforms

1.2. Update access key

create a new access key

aws iam create-access-key

configure new access key

aws configure
aws iam update-access-key --access-key-id {OLD_ACCESS_KEY} --status Inactive --user-name {user_name}
aws iam update-access-key --access-key-id {NEW_ACCESS_KEY} --status Active --user-name {user_name}
cat .aws/config
cat .aws/credentials
aws configure list

try to access s3 with new configuration

aws s3 ls

delete old access key

aws iam delete-access-key --access-key-id {OLD_ACCESS_KEY} --user-name {user_name}

Ref:Rotating access keys (AWS CLI)

1.3. Manage key pairs

list of key pairs

aws ec2 describe-key-pairs

show the detail of existed key pair

aws ec2 describe-key-pairs --key-name {KeyPair_NAME}

delete unnecessary key pair

aws ec2 delete-key-pair --key-name {KeyPair_NAME}

1.4. Get Account ID

echo $(aws sts get-caller-identity) | awk '{print $5}' | sed -e 's/"//g' -e 's/,//g' | pbcopy

1.5 Get list of Amazon Linux 2 AMI ImageId

aws ssm get-parameters-by-path --path "/aws/service/ami-amazon-linux-latest" --region us-east-1 --query 'Parameters[:].[Name,Value]' --output table

2. AWS CDK

HANDS-ON: GitHub

awscdk-prac

3. AWS S3 だけで静的コンテンツを配信する

3.1. S3 バケットを作成する

selfnotessというバケットを作成した。
..省略..

3.2. self-notes の dist の内容を S3 バケットに配置する(public 状態に変更)

s3 bucket directory

3.3. アクセスする

access succeeded

3.4. おまけ: CloudFront + Route53 + S3で独自ドメインを追加して配信する方法も試した

AWS Certificate Manager