HOME | Baty.net →

Amazon Web Services

Useful Links

Tips

A bucket policy is needed for making sure new files stay world-readable. Not needed when using s3deploy? Public read-only recursive bucket policy example:

{
   "Version": "2008-10-17",
   "Statement": [
       {
           "Sid": "PublicReadGetObject",
           "Effect": "Allow",
           "Principal": {
               "AWS": "*"
           },
           "Action": "s3:GetObject",
           "Resource": "arn:aws:s3:::bucketname.something.com/*"
       }
   ]
}  

https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html

Use wizard to create VPC

Point Cloudfront distributions to the website URL not the bucket so that subdirectories find /index.html files.

Multiple Roles https://aws.amazon.com/blogs/aws/new-cross-account-access-in-the-aws-management-console/ https://aws.amazon.com/blogs/security/enable-a-new-feature-in-the-aws-management-console-cross-account-access/

RDS in VPC https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.InstanceInVPC

List bucket contents and get total size example:

aws s3 ls --summarize --human-readable --recursive s3://www.baty.net

Handling multiple profiles in the aws cli AWS-CLI Profile Management Made Easy - Jayway

Getting a list of EC2 instances for a region via the cli using `jq`

aws ec2 describe-instances --region us-east-1 | jq ".Reservations[].Instances[] | {name: .KeyName, type: .InstanceType, state: .State.Name}"

Migrating or upgrading MySQL RDS How to Work Around RDS Limitations to Minimize MySQL Upgrades Downtime - The …

Assuming a Role in another account. Substitute the ARN.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "sts:AssumeRole",
      "Resource": "arn:aws:iam::123456789012:role/RoleNameInTargetAccount"
    }
  ]
}

How to Copy or Move Objects from one S3 bucket to another between AWS Account…

Author: Jack Baty jack@baty.net.
Last update : 2018-06-14 Thu 09:14