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

Error when deploying to a new AWS account #375

Closed
underbluewaters opened this issue Nov 24, 2024 · 5 comments
Closed

Error when deploying to a new AWS account #375

underbluewaters opened this issue Nov 24, 2024 · 5 comments
Milestone

Comments

@underbluewaters
Copy link
Collaborator

Looks like there are some permissions or setup-related work that isn't being handled by the CDK stack. Investigating...

gp-kiribati-reports: deploying... [1/1]
gp-kiribati-reports: creating CloudFormation changeset...
6:05:40 PM | CREATE_FAILED | AWS::ApiGatewayV2::Stage | GpSocketApiStageD8D179F5
CloudWatch Logs role ARN must be set in account settings to enable logging (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: 9d4c542d-0341-47df-b829-30e806837ef0; Proxy: null)

❌ gp-kiribati-reports failed: Error: The stack named gp-kiribati-reports failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: CloudWatch Logs role ARN must be set in account settings to enable logging (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: 9d4c542d-0341-47df-b829-30e806837ef0; Proxy: null)

@underbluewaters
Copy link
Collaborator Author

I was able to resolve this by following these instructions (though they are a little out of date).
https://coady.tech/aws-cloudwatch-logs-arn/

@twelch
Copy link
Contributor

twelch commented Nov 25, 2024

Thanks, couple questions, was this your first deploy that the error was produced? Did you do anything or enable any service or setting manually or otherwise that might have triggered it? How did you fix it exactly did you manually set something?

I’ve never seen this in my deploys even a week ago to test bleeding edge v7 code. I can see if it comes up on my next round, if not I might need more info to reproduce it. Thanks

@underbluewaters
Copy link
Collaborator Author

underbluewaters commented Nov 25, 2024

Sorry I didn't realize that probably wasn't clear from the description. This is with a brand-new AWS account, not the SeaSketch one. So there was some general CDK setup that I wasn't expecting, though it's API Gateway specific so it's not something that CDK calls out to the user. I should probably just make a note in the docs myself since I had to go through it recently. Something like:

In order for CDK to deploy geoprocessing functions on your AWS Account, it is necessary to specify 
an IAM Role which allows API Gateway to log debugging information to AWS CloudWatch. This can be 
accomplished by logging into the AWS console, switching to the region where you would like to deploy 
your geoprocessing function, and configuring this role 
[as described here](https://coady.tech/aws-cloudwatch-logs-arn/).

@twelch
Copy link
Contributor

twelch commented Nov 25, 2024

Makes sense, the words were in the title I just didn’t pick up on what it meant.

@twelch twelch added this to the 7.0 milestone Dec 13, 2024
@twelch
Copy link
Contributor

twelch commented Dec 30, 2024

Next/7.0 docs reference this setup step. More detailed instructions can be added once documented.

@twelch twelch closed this as completed Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants