-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[batch] Pass AWS_REGION by default to containers #10952
Comments
@Dzhuneyt cool suggestion. Definitely open to a contribution here. |
Work around <aws/aws-cdk#10952> by injecting `AWS_DEFAULT_REGION`. Set up production table using <pynamodb/PynamoDB#922 (comment)>.
Work around <aws/aws-cdk#10952> by injecting `AWS_DEFAULT_REGION`. Set up production table using <pynamodb/PynamoDB#922 (comment)>.
Prepares for auto-generated table names. Work around <aws/aws-cdk#10952> by injecting `AWS_DEFAULT_REGION`. Set up production table using <pynamodb/PynamoDB#922 (comment)>.
Prepares for auto-generated table names. Work around <aws/aws-cdk#10952> by injecting `AWS_DEFAULT_REGION`. Set up production table using <pynamodb/PynamoDB#922 (comment)>. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Ping. |
This would be very useful. Im currently using a framework that does not give me configurable access to the container definition. My golang sdks are not happy :-( |
…r, if they are not explicitly set (#21041) Closes #10952 ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [X] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…r, if they are not explicitly set (aws#21041) Closes aws#10952 ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [X] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…r, if they are not explicitly set (aws#21041) Closes aws#10952 ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [X] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Containers started through AWS Batch can't do even the most basic communication with other AWS services due to missing meaningful defaults.
Use Case
I've created an AWS Batch compute environment, queue and job definition. The job definition is very trivial - a NodeJS app that writes a row to DynamoDB. However, this trivial example fails with an error:
UnhandledPromiseRejectionWarning: ConfigError: Missing region in config
. That's because the AWS Batch container does not pass information about the current AWS region to the container, the same way it would pass it to the Lambda runtime, so the NodeJS app and the aws-sdk inside it, fails to connect to the DynamoDB service.Proposed Solution
I usually solve this by passing the AWS_REGION as an environment variable to the container definition:
This seems like something that can be embedded inside the JobDefinition construct to make life easy for developers that use this construct.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: