Skip to content

StatementId for S3 events have incompatible regex with Bucket names. #450

Description

@krispy1298

See this line:

StatementId: params.Bucket

The StatementId is being set to the bucket name. The regex for StatementId is ([a-zA-Z0-9-_]+) resulting in an error like when using valid Bucket names that contain domain names:

1 validation error detected: Value 'assets.xxxxxxxxx.com' at 'statementId' failed to satisfy constraint: Member must satisfy regular expression pattern: ([a-zA-Z0-9-_]+)

Docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#addPermission-property

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions