Hans Song
03/16/2022, 11:52 AMCustom::SSTBucketDeployment
here)
this results in pretty vague messages, e.g.
Custom::SSTBucketDeployment | .../ReactSite/S3Deployment/Default (ReactSiteS3Deployment...) Received response status [FAILED] from custom resource. Message returned: invalid request. Missing key 'Status'
i had to dig through the cloudwatch logs to find this
CalledProcessError: Command '['/opt/awscli/aws', 's3', 'cp', 's3:...', '/tmp/...']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/var/task/s3-upload.py", line 29, in handler
s3_deploy(s3_source_zip, s3_dest, file_options, replace_values)
...
i had to modify the lambda a bit to log the exception to figure out what went wrong (permissions in this case)Frank
Frank
Hans Song
03/16/2022, 10:47 PMFrank
StaticSite
construct should’ve already granted necessary permissions for the upload, ie. https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/StaticSite.ts#L289-L290Frank
Hans Song
03/17/2022, 1:59 AMs3:HeadObject
for it to be able to continueHans Song
03/17/2022, 2:01 AMs3:PutObject
, s3:ListObjectsV2
but i haven’t been able to test yetFrank
s3:PutObject
, s3:ListObjectsV2
Frank
s3:HeadObject
Hans Song
03/17/2022, 3:25 AMFrank
Hans Song
03/17/2022, 3:26 AMFrank