aws-samples / aws-serverless-workshops

Code and walkthrough labs to set up serverless applications for Wild Rydes workshops
http://wildrydes.com
Apache License 2.0
4.2k stars 2.63k forks source link

Image Processing - Step 2. Implementation - c. Cloudformation fails on PopulateTestImages #298

Closed mlukjanskatillster closed 3 years ago

mlukjanskatillster commented 3 years ago

Workaround: Disable rollback when creating the stack from the template and upload respective images in the riderphotos3bucket when going through the Step 2. Implementation - d. State Machine

Step that failed: PopulateTestImages

Error details from Cloudwatch logs:

[INFO]  2020-12-03T13:54:53.17Z af713fb1-283c-4f60-96b4-cf75d4fe7909    Received event: {
    "StackId": "arn:aws:cloudformation:us-east-1:390416312508:stack/wildrydes-step-module-resources/fc87b940-356e-11eb-9d8f-12417e4a260f",
    "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-east-1%3A390416312508%3Astack/wildrydes-step-module-resources/fc87b940-356e-11eb-9d8f-12417e4a260f%7CPopulateTestImages%7C8503eed1-dc64-441d-9319-e0b1b4776133?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201203T135452Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=AKIA6L7Q4OWT2RLZAIDW%2F20201203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=b20c1c6edbdffa5b93a4edcb1ef962ac93e8bf825bb82c31d69f17664450e6ff",
    "ResourceProperties": {
        "Bucket": "wildrydes-step-module-resource-riderphotos3bucket-ugne1f0umxyh",
        "SourceBucket": "wild-rydes-sfn-module-us-east-1",
        "ServiceToken": "arn:aws:lambda:us-east-1:390416312508:function:wildrydes-step-module-resour-CopyS3ObjectsFunction-R7E1J98WNQDC",
        "SourcePrefix": "test-images/"
    },
    "RequestType": "Create",
    "ServiceToken": "arn:aws:lambda:us-east-1:390416312508:function:wildrydes-step-module-resour-CopyS3ObjectsFunction-R7E1J98WNQDC",
    "ResourceType": "Custom::S3Objects",
    "RequestId": "8503eed1-dc64-441d-9319-e0b1b4776133",
    "LogicalResourceId": "PopulateTestImages"
}
[ERROR] 2020-12-03T13:54:53.370Z    af713fb1-283c-4f60-96b4-cf75d4fe7909    Error: An error occurred (NoSuchBucket) when calling the ListObjectsV2 operation: The specified bucket does not exist
angelarw commented 3 years ago

Just fixed the issue by updating the template to point to a different bucket that has the test images.