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

Read DB calls via @begin/data fail #67

Closed
macdonst opened this issue Sep 22, 2022 · 1 comment · Fixed by beginner-corp/begin-data#113
Closed

Read DB calls via @begin/data fail #67

macdonst opened this issue Sep 22, 2022 · 1 comment · Fixed by beginner-corp/begin-data#113

Comments

@macdonst
Copy link
Member

I deployed an app via begin app create and after successful app creation I hit the apps /games route.

If produces and error in the browser of:

{"message":"Internal Server Error"}

When I request the logs from the app using begin logs I get the following output which seems to indicate a permissions issue in access DynamoDB:

2022-09-22 13:30:08.134: START RequestId: c0ac7ff2-180e-4cbf-a843-aa655d8720d2 Version: $LATEST

2022-09-22 13:30:08.529: 2022-09-22T13:30:08.525Z	c0ac7ff2-180e-4cbf-a843-aa655d8720d2	ERROR	Invoke Error 	{"errorType":"AccessDeniedException","errorMessage":"User: arn:aws:sts::077166351318:assumed-role/A7JVBLPN0-Role-15FX9TMVNOFSS/A7JVBLPN0-AnyCatchallHTTPLambda-YYWmJVKObQNh is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:077166351318:parameter/Issue2Staging/tables/data because no identity-based policy allows the ssm:GetParameter action","code":"AccessDeniedException","message":"User: arn:aws:sts::077166351318:assumed-role/A7JVBLPN0-Role-15FX9TMVNOFSS/A7JVBLPN0-AnyCatchallHTTPLambda-YYWmJVKObQNh is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:077166351318:parameter/Issue2Staging/tables/data because no identity-based policy allows the ssm:GetParameter action","time":"2022-09-22T13:30:08.522Z","requestId":"1167fe27-582b-42dd-b401-6d97913b998c","statusCode":400,"retryable":false,"retryDelay":33.880872459309956,"stack":["AccessDeniedException: User: arn:aws:sts::077166351318:assumed-role/A7JVBLPN0-Role-15FX9TMVNOFSS/A7JVBLPN0-AnyCatchallHTTPLambda-YYWmJVKObQNh is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:077166351318:parameter/Issue2Staging/tables/data because no identity-based policy allows the ssm:GetParameter action","    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)","    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)","    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)","    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)","    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)","    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)","    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10","    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)","    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12)","    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"]}

2022-09-22 13:30:08.533: REPORT RequestId: c0ac7ff2-180e-4cbf-a843-aa655d8720d2	Duration: 397.07 ms	Billed Duration: 398 ms	Memory Size: 1152 MB	Max Memory Used: 86 MB

2022-09-22 13:30:08.533: END RequestId: c0ac7ff2-180e-4cbf-a843-aa655d8720d2

2022-09-22 13:30:08.723: START RequestId: aa0860ad-8e3f-465a-a030-aa52d0021afb Version: $LATEST

2022-09-22 13:30:08.745: REPORT RequestId: aa0860ad-8e3f-465a-a030-aa52d0021afb	Duration: 21.45 ms	Billed Duration: 22 ms	Memory Size: 1152 MB	Max Memory Used: 86 MB

2022-09-22 13:30:08.745: END RequestId: aa0860ad-8e3f-465a-a030-aa52d0021afb
@ryanbethel
Copy link
Contributor

+1
Seeing the same thing with an app I deployed. Permissions error when writing to the dynamo table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants