terraform-lambda-ecr-integration: Update AWS Provider to v6#3092
terraform-lambda-ecr-integration: Update AWS Provider to v6#3092kakakakakku wants to merge 4 commits intoaws-samples:mainfrom
Conversation
|
|
||
| # Build image | ||
| docker build --no-cache -t ${IMAGE_NAME} ${BUILD_FOLDER} --platform linux/amd64 | ||
| docker build --no-cache --provenance=false -t ${IMAGE_NAME} ${BUILD_FOLDER} --platform linux/amd64 |
There was a problem hiding this comment.
╷
│ Error: creating Lambda Function (testing-serverlessland-ecr-lambda): operation error Lambda: CreateFunction, https response error StatusCode: 400, RequestID: 337794b6-72f5-4311-804b-a607af78a1ae, InvalidParameterValueException: The image manifest, config or layer media type for the source image 000000000000.dkr.ecr.us-east-1.amazonaws.com/testing-serverlessland-ecr-lambda@sha256:c548298ac414e9880c90c95b21be156f3a1dda1c6c86ef7882db9e9474a0952c is not supported.
│
│ with aws_lambda_function.this_aws_lambda_function,
│ on main.tf line 186, in resource "aws_lambda_function" "this_aws_lambda_function":
│ 186: resource "aws_lambda_function" "this_aws_lambda_function" {
│
╵
| env = var.env | ||
| } | ||
| region = data.aws_region.current.name | ||
| region = data.aws_region.current.id |
There was a problem hiding this comment.
╷
│ Warning: Deprecated attribute
│
│ on main.tf line 17, in locals:
│ 17: region = data.aws_region.current.name
│
│ The attribute "name" is deprecated. Refer to the provider documentation for details.
|
Hi @kakakakakku Thanks for the updates. The |
|
@ellisms |
|
@ellisms
I've attached a screenshot of the
Could you share more details about the error you encountered? Also, even for a sample pattern, I think Thank you! |

Issue #, if available:
N/A
Description of changes:
Hi😀 Thanks for the useful patterns!
To keep this pattern maintainable, I updated the AWS Provider to v6 and replaced deprecated HCL code. Also added
--provenance=falseto docker build for compatibility with newer Docker Desktop.Check
terraform applycompleted successfully and works good.$ aws lambda invoke \ --function-name testing-serverlessland-ecr-lambda \ --cli-binary-format raw-in-base64-out \ --log-type Tail --query 'LogResult' --output text --region us-east-1 \ response.json | base64 --decode START RequestId: d8dfae9d-2056-4d07-9f51-3cea5607d4bd Version: $LATEST 2026-05-02 08:02:10,082 : INFO : Lambda Function Started. 2026-05-02 08:02:10,082 : INFO : 2026-05-02 08:02:10,082 : INFO : Sending Control to Shell Script... hello world from the shell script in testing environment for serverlessland Org Executing ls command at : Sat May 2 08:02:10 UTC 2026 total 2 -rwxr-xr-x 1 root root 794 Jul 5 2025 app.py -rwxr-xr-x 1 root root 163 Jul 5 2025 sample-bash.sh 2026-05-02 08:02:10,207 : INFO : ...Control is back in Python 2026-05-02 08:02:10,207 : INFO : 2026-05-02 08:02:10,207 : INFO : Lambda Function Finished. END RequestId: d8dfae9d-2056-4d07-9f51-3cea5607d4bd REPORT RequestId: d8dfae9d-2056-4d07-9f51-3cea5607d4bd Duration: 131.54 ms Billed Duration: 952 ms Memory Size: 512 MB Max Memory Used: 38 MB Init Duration: 820.09 msThank you😀
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.