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

StaticAssetUploaderLambdaFunction errors with PublicAccessBlockConfiguration: #429

Open
jimomulloy opened this issue Jul 21, 2020 · 3 comments

Comments

@jimomulloy
Copy link

jimomulloy commented Jul 21, 2020

In Version 4.0.x - when creating a devportal (in developer mode) I see errors in the StaticAssetUploaderLambdaFunction console and the stack does not complete create.

It seems if I remove the PublicAccessBlockConfiguration: fromr the S3 buckets DevPortalSiteS3Bucket when in Dev mode it works OK:

PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true

Unhandled Promise Rejection
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "AccessDenied: Access Denied",
"reason": {
"errorType": "AccessDenied",
"errorMessage": "Access Denied",
"code": "AccessDenied",
"message": "Access Denied",
"region": null,
"time": "2020-07-21T14:02:46.389Z",
"requestId": "B259B22412D19E07",

@jimomulloy
Copy link
Author

Hi Devportal team.

Please can we get a response to this issue.

We make good use of the AWS Devportal in our company (Visionhealth ltd) to present our AWS Cloud based service's OpenAPI documentation.

We also need the "Dev" flag to do our development.

So it is essential we have a resolution to this issue if at all possible.

Many thanks from Jim O'Mulloy (Vision Health ltd.)

@jimomulloy
Copy link
Author

by the way I have made fork that does work - by adding something this to the code. I am not confident this is the correct approach to make a PR though.
.....
DevPortalSiteS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref DevPortalSiteS3BucketName
PublicAccessBlockConfiguration:
BlockPublicAcls: !If [ NotDevelopmentMode, 'true', 'false' ]
BlockPublicPolicy: !If [ NotDevelopmentMode, 'true', 'false' ]
IgnorePublicAcls: !If [ NotDevelopmentMode, 'true', 'false' ]
RestrictPublicBuckets: !If [ NotDevelopmentMode, 'true', 'false' ]

@jimomulloy
Copy link
Author

Hi - this issue still open after 6 months - please let us know if there is a solution ? thanks

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

No branches or pull requests

1 participant