pulumi-awsx
pulumi-awsx copied to clipboard
AWS region configuration issue - Fargate task defintion log group region
What happened?
I was following this tutorial: https://github.com/pulumi/examples/tree/master/aws-ts-containers, using an AWS profile. In my ~.aws folder there is a credentials file and configuration file with a region defined for the profile. Creation of Fargate service failed with timeout, root cause was failure of the task to execute as the log group region was "null" Issue resolved once region was configured in Pulumi yaml file.
Expected Behavior
Either use region configured for the aws profile, or report an error.
Steps to reproduce
- Using AWS CLI, create a profile, configure credentials and a region for the profile
- Follow the tutorial https://github.com/pulumi/examples/tree/master/aws-ts-containers
- Do not configure region in Pulumi yaml
- Run
pulumi up
Output of pulumi about
CLI
Version 3.79.0
Go Version go1.21.0
Go Compiler gc
Plugins NAME VERSION aws 5.42.0 aws-native 0.8.0 awsx 1.0.5 docker 3.6.1 nodejs unknown
Host
OS darwin
Version 13.5.1
Arch arm64
This project is written in nodejs: executable='/usr/local/bin/node' version='v18.13.0'
Current Stack: organization/observability-playground/observability-playground-1
Found no resources associated with observability-playground-1
Found no pending operations associated with observability-playground-1
Backend
Name MacBook-Air-2.localdomain
URL file://./data
User ***
Organizations
Dependencies: NAME VERSION @pulumi/aws-native 0.8.0 @pulumi/awsx 1.0.5 @pulumi/pulumi 3.79.0 @types/node 16.18.46
Pulumi locates its logs in /var/folders/mx/64p_g9kx79n58s0pm8718y3m0000gn/T/ by default
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
Hey. Thanks for filing this. I'm glad you have a workaround. This appears to potentially be an issue with the pulumi aws provider so I'll transfer your issue there and they should be able to better help you.
I was able to reproduce this issue locally, thank you @ygyg70 for the detailed description.
It's definitely an issue in our awsx implementation, not in the provider itself, so I will move the issue again. It looks like it's about the way we retrieve the default region here, or rather about the implementation of the getRegion function in utils.