I’m trying this out for the first time, and had an issue with deploying where my config creates a bucket, which triggers an event and runs a function. It says it already exists but no way in hades a bucket has this name. I tried different bucket names several times.
A bit of my config
custom:
bucket: uniquebucket-fhdjsjdhejcndjskdf
provider:
name: aws
runtime: nodejs8.10
iamRoleStatements:
-
Effect: Allow
Action: -
s3:*
Resource: “*”postprocess:
handler: api/handler.postprocess
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- suffix: .html
resources:
Resources:
S3UploadBucket:
Type: ‘AWS::S3::Bucket’
Properties:
BucketName: ${self:custom.bucket}
nasty little error
An error occurred: S3BucketUniquebucketfhdjsjdhejcndjskdf - uniquebucket-fhdjsjdhejcndjskdf already exists in stack arn:aws:cloudformation:us-east-1:278876728797:stack/html-pdf-dev/1f77d900-f92e-11e8-bd24
-0a16600979f0.
Any ideas what I am doing wrong?