Open marcoesposito1988 opened 7 years ago
I don't encounter this error. Maybe you don't have a default region set for your AWS credentials?
I agree with @sibblegp. I would recommend reviewing the Quick Configuration in the Configuring the AWS CLI section of the AWS Documentation.
I had the same problem encountered by @marcoesposito1988 . I just ran the aws configure
command (you can see in the links provided by @mackaltman ). This will create a file in your ~/.aws/config file (note that is not the credentials file). You should see the region there.
I did as @rennomarcus described and this resolved the issue for me. While this configuration may be best kept to awscli
, it perhaps would be helpful if Zappa could detect the absence of a default region setting and suggest the proper course of action to the user (run aws configure
).
@vc1492a or @rennomarcus , Can any one of you describe how exactly did you guys solved the problem and also I will be able if one of you can send a sample of how the zappa_settings.json file look like
Context
"zappa init" asks if the user would like to deploy the lambda function globally, in all AWS regions. If the user chooses "no", the zappa_settings.json does not contain an "aws_region" entry, and the deployment fails. Should the script propose a list of regions and ask the user to choose one? Or just prompt a reminder to add an aws region after the script is done? ## Expected BehaviorWould you like to deploy this application globally? (default 'n') [y/n/(p)rimary]: n
Actual Behavior
Would you like to deploy this application globally? (default 'n') [y/n/(p)rimary]: n
botocore.exceptions.NoRegionError: You must specify a region.
Possible Fix
We could either: