Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "chore: block insecure traffic to deployment bucket" #10591

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

sachscode
Copy link
Contributor

Reverts #10533

Analysis:
The error "A conflicting conditional operation is currently in progress against this resource. Please try again." is thrown when the BPA (Block Public Access) policy is applied by the amplify generated CloudFormation and AWS at the same time. AWS applies the BPA policy on any S3 bucket resource immediately after its creation. This is applied asynchronously hence it may not show up consistently. As of now, we do not have a way to serialize/coordinate application of the BPA policy with AWS from Cloudformation/CDK. This needs to be researched further.

Prior errors seen in Terraform :
hashicorp/terraform-provider-aws#7628 have been resolved by explicitly retrying application of BPA using AWS SDK if the deployment errors contain the above mentioned error.

e.g. https://github.com/hashicorp/terraform-provider-aws/pull/12949/files#diff-7ea49767db8110becb01510a3562ba5f3450dc361bf8aa3622a4cc27a540a0e3R1743-R1747
has code to use AWS SDK and retry application of policy.

Mitigation:
We will revert the PR cc36d9b

Solution:
A long term solution would require us to codify the condition ( if account level BPA policy is being enforced by AWS ) and depend on that condition to complete before creating the deployment bucket policies.

@sachscode sachscode requested a review from a team as a code owner June 14, 2022 02:10
@sachscode sachscode merged commit 8d7b710 into master Jun 14, 2022
@evcodes evcodes deleted the revert-10533-s3-policy branch February 18, 2023 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants