aws-samples / aws-samples/aws-security-reference-architecture-examples

[BUG] ami_bakery deployment issue

Open
#310 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
1.2k
Forks
303
Avg merge
3d 9h
Merged PRs (30d)
1

Description

### Describe the bug

The deployment fails because the Lambda function is trying to create "A Code Commit Repository to store CloudFormation Templates that define EC2 Image Builder, Recipes, Components, etc." but is unable to in an Organization/Account that has never used CodeCommit Repositories, and the service is no longer open to new customers.

The following error is seen in CloudFormation:

rAMIBakeryOrgLambdaCustomResource
CREATE_FAILED
Likely root cause

Received response status [FAILED] from custom resource. Message returned: An error occurred (OperationNotAllowedException) when calling the CreateRepository operation: CreateRepository request is not allowed because there is no existing repository in this AWS account or AWS Organization (RequestId: d5788f00-1bea-4e5c-8bc6-bd2a3794255a)

### To Reproduce

Steps to reproduce the behavior:

1. Deploy the solution in an Organization & Account that has never used CodeCommit Repositories.
2. See error in CloudFormation stack - StackSet-CustomControlTower-sra-ami-bakery-org-main-ssm-*****

### Expected behavior

CloudFormation CREATE_COMPLETE

### Screenshots

N/A

### Deployment Environment (please complete the following information)

- Deployment Framework [e.g. Customizations for Control Tower and CloudFormation StackSets]: customizations-for-aws-control-tower
- Deployment Framework Version [e.g. 1.0, 2.0]: v2.8.3

### Additional context

Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.