jetbridge / jetbridge/cdk-nextjs

Permissions issue creating Lambda

Open
#232 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
362
Forks
50
PR merge metrics
No merged PRs in 30d

Description

When deploying the stack to eu-west-1 region

```
4:26:02 PM | CREATE_FAILED | AWS::Lambda::Permission | NextjsImageinvokefunctionurl625AF4EF

Resource handler returned message: "Lambda blocked the creation of this policy because it would grant public access to your function. If this is intentional, change your function's BlockPublicPolicy setting to allow public access and try again. (Service: Lambda, Status Code: 400, Request ID: 0ba9163b-4250-43db-a713-faf5bde8e803)" (RequestToken: 8b435ef0-b4f2-8773-bdad-306f898d4071, HandlerErrorCode: GeneralServiceException)
```

This looks like it is due to a recent change at AWS: **Support for JSON resource-based policies and block public access**

## References

- https://aws-new-features.s3.us-east-1.amazonaws.com/update/2024-09-18.html
- https://docs.aws.amazon.com/lambda/latest/dg/permissions-public-access.html
- https://docs.aws.amazon.com/lambda/latest/api/API_PutPublicAccessBlockConfig.html

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.