aws-samples / aws-samples/bedrock-chat
[BUG] Image Manifest is not supported - when deploying Lambda functions
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 535
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 10
Description
## 🚨 **Please Note** 🚨
To ensure efficient investigation of the issue, please fill out the fields below with as much detail as possible. **Reports that do not follow this template may be closed without notification.** We appreciate your cooperation.
## 🐞Describe the bug
In AWS Codepipeline, CDK fails to deploy - because the Lambda function deployment fails - because the image manifest, config or layer media type is not supported.
### Error message
```
BedrockChatStack | 77/159 | 9:57:34 AM | CREATE_FAILED | AWS::Lambda::Function | Embedding/FetchStackOutputHandler (EmbeddingFetchStackOutputHandlerA0F2B6A9) Resource handler returned message: "The image manifest, config or layer media type for the source image 367749062877.dkr.ecr.us-east-1.amazonaws.com/cdk-hnb659fds-container-assets-367749062877-us-east-1:b15a8be4c79bc7f56ef42399e3871920382d83febe3090a677f12d35de4f9430 is not supported. (Service: Lambda, Status Code: 400, Request ID: 1588994a-ad09-402e-822f-d7a40ec86d70) (SDK Attempt Count: 1)" (RequestToken: 930e0736-7d5d-d5e2-ecee-73b35be76d71, HandlerErrorCode: InvalidRequest)
```
When deploying the solution using default configuration in the AWS Code PipelineA clear and concise description of what the bug is.
## 🔄 To Reproduce
Steps to reproduce the behavior:
1. ./bin.sh --disable-self-register --ipv4-ranges "0.0.0.0/1,128.0.0.0/1" --ipv6-ranges "" --allowed-signup-email-domains "example.com" --bedrock-region "us-east-1"
2. Deployment fails.
3. Go to the AWS Codebuild pipeline log to view the above error.
7. See error## 📷 Screenshots
If applicable, add screenshots to help explain your problem.
## 🔎 Logs for Chat Issues
N/A
## 🔎 Logs for Bot Creation/Update Issues
N/A
## 📝 Additional context
The same error was also observed when trying to deploy from a Mac using the CDK mode.
Adapted the scripts to add --provenance=false , (see re:Post - https://repost.aws/articles/ARnjMtSZIySZWAAo9mC85SIQ/how-to-build-container-images-on-m2-macbook-and-use-them-in-lambda-functions) but that did not seem to fix the problem.
Workaround:
Enforce the use of BuildX and remove attestations
export DOCKER_BUILDKIT=1
export PROVENANCE=false
export BUILDX_NO_DEFAULT_ATTESTATIONS=1
Contributor guide
Research direction
Start with ./bin.sh and the container image build configuration used by the AWS CodePipeline and CDK deployment paths. Reproduce the failure with the listed command, inspect the CodeBuild pipeline logs, and compare the image metadata with the documented BuildX workaround. Done means Lambda deployment succeeds without the unsupported image manifest, config, or layer media type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, typescript
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100