Skip to content

Commit

Permalink
Bump version (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorKirk authored Jan 17, 2022
1 parent 59ce749 commit cc8b3c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Metadata:
Mappings:
Solution:
Constants:
Version: 'v0.5'
Version: 'v0.6'

Parameters:
SubDomain:
Expand Down Expand Up @@ -77,7 +77,7 @@ Outputs:
SolutionVersion:
Value: !FindInMap [Solution, Constants, Version]
CopyFunction:
Description: S3 helper function
Description: S3 helper function
Value: !GetAtt CustomResourceStack.Outputs.CopyFunction
S3BucketLogs:
Description: Logging bucket
Expand All @@ -92,7 +92,7 @@ Outputs:
Description: Website bucket name
Value: !GetAtt CustomResourceStack.Outputs.S3BucketRootName
CertificateArn:
Description: Issued certificate
Description: Issued certificate
Value: !GetAtt AcmCertificateStack.Outputs.CertificateArn
CFDistributionName:
Description: CloudFront distribution
Expand Down

5 comments on commit cc8b3c5

@RickDir
Copy link

@RickDir RickDir commented on cc8b3c5 Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ConnorKirk, on this page: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/getting-started-secure-static-website-cloudformation-template.html under "Using the AWS CloudFormation console" I clicked on the Launch on AWS button 2 days ago when you were still showing v0.5 for the S3 paths in the template. I ran it in the console set for us-west-1 zone. The nested stack events showed: LambdaPolicy CREATE_COMPLETE, S3BucketRoot CREATE_COMPLETE, CopyRole CREATE_COMPLETE But then failed with the error: Logical ID = “amazon-cloudfront-secure-static-site-templates-main-CustomResourceStack-198HK6ETN1D3Q” with the Status reason: “The following resource(s) failed to create: [CopyLayerVersiond4454a3e74, CFNCustomProvider].” Clicking on the main stack showed two errors. The first error: Logical ID = “CustomResourceStack” CREATE_FAILED with the Status reason: “Embedded stack arn:awscloudformation:us-west-1:[acct#]:stack/amazon-cloudfront-secure-static-site-templates-main-CustomResourceStack-198HK6ETN1D3Q/b0d551f0-7772-11ec-8bc2-026c3d08ff5d was not successfully created: The following resource(s) failed to create: [CopyLayerVersiond4454a3e74, CFNCustomProvider].” The second error: Logical ID = “amazon-cloudfront-secure-static-site-templates-main” CREATE_FAILED with the Status reason: “The following resource(s) failed to create: [CustomResourceStack].” I rolled back, however I did not delete the 3 buckets it created nor the template it placed in the template bucket nor any of the logs files being placed in the log bucket. I didn’t see any edge lambdas or normal lambdas, cloudfront distributions, nor any files in the root bucket so as a side issue where do you think the logfiles are coming from and why? Opening up a few of the log files.. they seem to only mention cloudfront this or that. A new one gets created every 1-5 per minute and are 700b to 3kb in size. I then set my zone to N. Virginia, and ran it from the console again. This time I received the following 3 errors (and I also just noticed the version in the S3 paths in the template have now been updated to v0.6 since my previous run): One error is: “CustomResourceStack” “CREATE_FAILED” “S3 error: Access Denied For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html”. The second error is: “AcmCertificateStack” “CREATE_FAILED” “S3 error: Access Denied For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html”. The third error is: “amazon-cloudfront-secure-static-site-templates-main” “CREATE_FAILED” “The following resource(s) failed to create: [AcmCertificateStack, CustomResourceStack].” This time it didn’t create anything and there was no “nested” stack. I rolled back again, deleted the 3 buckets created on the first iteration, created an S3 bucket with a totally random name to validate that was working and ran it again from the console. However, I got these same 3 errors. Any help would be greatly appreciated. Thank you.

@ConnorKirk
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RickDir ,
I will investigate and get back to you.

@ConnorKirk
Copy link
Contributor Author

@ConnorKirk ConnorKirk commented on cc8b3c5 Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again,
I think I've identified the issue. Should have it solved shortly.
I'm really sorry for the inconvenience

@ConnorKirk
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again @RickDir

Could you try deploying again with the latest version? I think the latest release has fixed the issue you were encountering.
I'm sorry again for the inconvenience

@RickDir
Copy link

@RickDir RickDir commented on cc8b3c5 Jan 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ConnorKirk it worked Fantastically in us-east-1! (as mentioned here on github in the open issues tab).
I also liked that you updated the CloudFront piece to use CloudFront Response Header Policies to add security headers to every server response rather than the Lambda.
Thank you so much, and your lightning-fast attention to this was no inconvenience. It's all really great!

Please sign in to comment.