AWS Mythical Mysfits Tutorial

Working through the AWS developer tutorial on creating a website - had several issues:

  1. Connectivity necessary for the Cloud9 development environment
  2. MalformedPolicy for the S3 Bucket

When creating the Cloud9 environment, it had the error:

	This is taking longer than expected. If you think there might be an issue, contact AWS Support.
	It might be caused by VPC configuration issues. Please check documentation.

After working through the VPC documents, found that it was easier to create a new account with only the default security group. This error seems to be related to restrictions on ssh.


For the hosting section in the static website, when running the command:

awscon1:~/environment/aws-modern-application-workshop (python) $ aws s3api put-bucket-policy --bucket small-mythical-mysfits \
    --policy file://~/environment/aws-modern-application-workshop/module-1/aws-cli/website-bucket-policy.json
An error occurred (MalformedPolicy) when calling the PutBucketPolicy operation: Invalid principal in policy

The principle in the example is:

principle: "*",

while the copy from the repo has:

            "Principal": {
                "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity REPLACE_ME_CLOUDFRONT_ORIGIN_ACCESS_IDENTITY_ID"
            },

Replaced everything in the curly-braces with a star, this time the aws s3api put-bucket-policy command worked correctly.


Static site started at https://s3.us-east-2.amazonaws.com/small-mythical-mysfits/index.html, need to work on Fargate (stage 2).