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

grantPublicAccess() not granting access on an already existing bucket created manually #7370

Closed
marcindulak opened this issue Apr 15, 2020 · 3 comments
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p1

Comments

@marcindulak
Copy link

On https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-readme.html#importing-existing-buckets there is an example which modifies access permissions on an already existing bucket, created manually from the AWS web console.

The example below does not modify the access permissions on the bucket, and the generated cdk.out/MyS3.template.json has an empty object.

Using https://github.com/aws/aws-cdk/releases/tag/v1.32.2 with typescript.

import cdk = require('@aws-cdk/core');
import s3 = require('@aws-cdk/aws-s3');

class MyS3 extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const bucket = s3.Bucket.fromBucketName(this, 'bucket', 'my-bucket-random-string');
    bucket.grantPublicAccess();
  }
}

const app = new cdk.App();
new MyS3(app, 'MyS3');
app.synth();

This is a 📕 documentation issue

@marcindulak marcindulak added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 15, 2020
@SomayaB SomayaB added @aws-cdk/aws-s3 Related to Amazon S3 documentation This is a problem with documentation. labels Apr 16, 2020
@iliapolo
Copy link
Contributor

Related to #6548

@iliapolo iliapolo added p1 bug This issue is a bug. and removed feature-request A feature should be added or improved. labels May 12, 2020
@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label May 19, 2020
@iliapolo iliapolo added the effort/small Small work item – less than a day of effort label Aug 20, 2020
@iliapolo
Copy link
Contributor

The fix for this issue should just be a documentation change in the example. The broader scope and solution will be discussed and resolved as part of #6548

@iliapolo iliapolo removed their assignment Jun 27, 2021
mergify bot pushed a commit that referenced this issue Jul 27, 2021
This is to clarify that in some cases the policy will not be added and the result should be checked.

Closes #6548 and #7370.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Aug 3, 2021
This is to clarify that in some cases the policy will not be added and the result should be checked.

Closes aws#6548 and aws#7370.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
This is to clarify that in some cases the policy will not be added and the result should be checked.

Closes aws#6548 and aws#7370.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

No branches or pull requests

4 participants