aws-solutions / aws-waf-security-automations

This solution automatically deploys a single web access control list (web ACL) with a set of AWS WAF rules designed to filter common web-based attacks.
https://aws.amazon.com/solutions/aws-waf-security-automations
Apache License 2.0
843 stars 361 forks source link

README unclear in regards to DIST_OUTPUT_BUCKET, appending AWS::REGION, and $SOLUTION_NAME #154

Closed CameronMcAuley closed 1 year ago

CameronMcAuley commented 3 years ago

Describe the issue

S3Bucket: !Join ['-', [!FindInMap ["SourceCode", "General", "SourceBucket"], !Ref 'AWS::Region']]

Changes Needed

CameronMcAuley commented 3 years ago

In addition, the README also tells the user to upload the template/dist to the following s3 location: s3://$DIST_OUTPUT_BUCKET-$AWS_REGION/aws-waf-security-automations/$VERSION

If the user ran sudo ./build-s3-dist.sh $TEMPLATE_OUTPUT_BUCKET $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION with a custom $SOLUTION_NAME, this is the directory within S3 that CloudFormation will look for. If it doesn't find it, it will fail.

So, these AWSCLI S3 commands need to reference the $SOLUTION_NAME variable created earlier, i.e:

aws s3 cp ./deployment/global-s3-assets s3://$TEMPLATE_OUTPUT_BUCKET/$SOLUTION_NAME/$VERSION --recursive --acl bucket-owner-full-control
aws s3 cp ./deployment/regional-s3-assets s3://$DIST_OUTPUT_BUCKET-$AWS_REGION/$SOLUTION_NAME/$VERSION --recursive --acl bucket-owner-full-control

In general, this README needs to be much more verbose. I've wasted quite a few hours due to things that weren't clear.

aijunpeng commented 3 years ago

Thanks for reporting the issue. We updated the readme in our most recent release to make it more clear. For example we give an explanation of each env variable and documented when to use each variable. However we do understand there are still confusions caused by missing details. We have added your request to our backlog so it will be addressed in future releases. We thank you for your contribution.

aijunpeng commented 1 year ago

The readme instructions have been updated to provide more clarity. close the ticket.