Reggionick / s3-deploy

Easily deploy a static website to AWS S3 and invalidate CloudFront distribution
MIT License
242 stars 83 forks source link

Invalid/missing credentials does not cause fail state #35

Open slaughtr opened 3 years ago

slaughtr commented 3 years ago

When deploying, if credentials aren't loaded, the action still counts as a pass. Took us by surprise, as the step "passed". After poking around at Cloudfront it became obvious invalidations weren't happening...and when finally looking in the logs of the deploy action it became very apparent that nothing was happening, but we still had our big green check marks.

Unexpected error: (CredentialsError) Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1, aborting upload for asset-manifest.json
Unexpected error: (CredentialsError) Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1, aborting upload for index.html
Unexpected error: (CredentialsError) Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1, aborting upload for manifest.json
Unexpected error: (CredentialsError) Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1, aborting upload for precache-
coulonxyz commented 2 years ago

Same issue here. Cloudfront invalidation failed and the workflows kept going:

Upload finished
AccessDenied: User: arn:aws:sts::***:assumed-role/plan/1234567+XXXX-site+98765432#1 is not authorized to perform: cloudfront:CreateInvalidation on resource: arn:aws:cloudfront::***:distribution/*** because no identity-based policy allows the cloudfront:CreateInvalidation action
ghost commented 2 years ago

Any news on this topic? I think it's a very serious problem.

TravelPaul commented 9 months ago

this has just caught us out too