Open ethanholz opened 3 months ago
Per the following issue https://github.com/boto/boto3/issues/3620#issuecomment-1462661383, boto3
does not support the use of AWS_REGION
at this time. We will instead rely on the use of AWS_DEFAULT_REGION
and override the region if it is provided.
This was not solved in the PR above and the changes have since been reverted. Further research into doing this correctly may require better integration testing before we build this out in a way I am happy with.
When doing testing on this, it appears that even though AWS_DEFAULT_REGION
is set, it does not set the region when making API calls. However, we can still utilize the AWS_REGION
parameter to be more in-line with other AWS tools. The precedence for this would be something like
AWS_REGION
AWS_DEFAULT_REGION
This allows for the YAML to always override these variables.
When using
configure-aws-credientials
,AWS_REGION
andAWS_DEFAULT_REGION
get set in the environment and passed down to our container. TheAWS_REGION
gets populated by the region that is set during setup. Utilizing the variables reduces redundancy in our configs and will get automatically picked up byboto3
(similar to how we currently get the keys from the environment). Adopting these as practice allows for us to stay in line with AWS best practices when utilizing the SDK.Furthermore, this would reduce the start and stop to look like the following.
Start
Stop