Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lambda): add AWS_DEFAULT_REGION to the list of reserved environment variables #28048

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

sakurai-ryo
Copy link
Contributor

@sakurai-ryo sakurai-ryo commented Nov 17, 2023

Changes

Description

The Function constructor checks that reserved environment variables are not specified when adding environment variables.
However, when I mistakenly specified AWS_DEFAULT_REGION as an environment variable, cdk synth did not generate an error.

The following document contains the list of reserved environment variables.
https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime

Cloudformation gives the following error.
Resource handler returned message: "Lambda was unable to configure your environment variables because the environment variables you have provided contains reserved keys that are currently not supported for modification. Reserved keys used in this request: AWS_DEFAULT_REGION


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Nov 17, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team November 17, 2023 12:27
@sakurai-ryo sakurai-ryo marked this pull request as ready for review November 17, 2023 13:03
@sakurai-ryo sakurai-ryo changed the title chore(lambda): add AWS_DEFAULT_REGION as a reserved environment variable chore(lambda): add AWS_DEFAULT_REGION to the list of reserved environment variables Nov 17, 2023
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 17, 2023
Copy link
Contributor

@vinayak-kukreja vinayak-kukreja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thank you for contributing this to the repository. Really appreciate it.

Copy link
Contributor

mergify bot commented Nov 17, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@vinayak-kukreja vinayak-kukreja self-assigned this Nov 17, 2023
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 17, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: f31e90e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 4713547 into aws:main Nov 17, 2023
12 checks passed
Copy link
Contributor

mergify bot commented Nov 17, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants