Description
Describe the bug
All actions in the pipeline Bootstrap stage fail except for Bootstrap action when running the toolkit-project CodeBuild with "upload failed (NoSuchBucket)"
To Reproduce
Deploy LZA v1.12.0 via an external pipeline account
Set the following parameter values in the AWSAccelerator-Installer stack
EnableApprovalStage: Yes
AcceleratorQualifier: test-env
The deployment fails when the pipeline reaches the Bootstrap stage. All actions with the exception of the Bootstrap action fail. When checking the logs for the individual actions (codebuild test-env-toolkit-project), they all have an failure similar to:
upload failed: ./diff_finalize.tgz to s3://aws-accelerator-pipeline-<AccountID>-<Region>/AWSAccelerator-Pipel/Diffs/<CODEPIPELINE_EXECUTION_ID>/diff_finalize.tgz An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
Expected behavior
The target bucket s3://aws-accelerator-pipeline-<AccountID>-<Region> for this command does not exist.
It should use the bucket generated by the pipeline stack that references the AcceleratorQualifier parameter, eg s3://test-env-pipeline-<AccountID>-<Region>.
It appears that the buildspec fails to take the AcceleratorQualifier into account and hardcodes "aws-accelerator" into the bucket name during the prebuild phase.
export DIFFS_DIR=\"s3://aws-accelerator-pipeline-<AccountID>-<Region>/AWSAccelerator-Pipel/Diffs\"
Please complete the following information about the solution:
- Version: v1.12.0
- Region: eu-west-2
- Was the solution modified from the version published on this repository?: No
- If the answer to the previous question was yes, are the changes available on GitHub?
- Have you checked your [service quotas]: yes (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) for the services this solution uses?
- Were there any errors in the CloudWatch Logs? - details provided above
Additional context
Add any other context about the problem here.