Skip to content

Feature: S3 method to enable public access #877

@DavidChristiansen

Description

@DavidChristiansen

Request the following feature to enable access by 'http://acs.amazonaws.com/groups/global/AllUsers'
to a given s3 bucket.

const bucket = new s3.Bucket(this, 'cdk-lab');
bucket.grantPublicAccess();   

The same can be achieved through the following code snippet

bucket.addToResourcePolicy(new cdk.PolicyStatement()
            .addAction('s3:GetObject')
            .addResource(bucket.arnForObjects('*'))
            .addPrincipal(new cdk.Anyone()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions