terraform-lambda-ecr-integration: Update AWS Provider to v6#3092
Open
kakakakakku wants to merge 4 commits intoaws-samples:mainfrom
Open
terraform-lambda-ecr-integration: Update AWS Provider to v6#3092kakakakakku wants to merge 4 commits intoaws-samples:mainfrom
kakakakakku wants to merge 4 commits intoaws-samples:mainfrom
Conversation
kakakakakku
commented
May 2, 2026
|
|
||
| # 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 |
Contributor
Author
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" {
│
╵
kakakakakku
commented
May 2, 2026
| env = var.env | ||
| } | ||
| region = data.aws_region.current.name | ||
| region = data.aws_region.current.id |
Contributor
Author
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.