Circular dependencies in AWS SAM Policies
I'm trying to tighten up the policies of my AWS Lambda function so that it only has access to the one S3 bucket that it needed, so I added an S3CrudPolicy with the BucketName referencing the bucket that's defined in the template. The relevant part of template.yaml looks like this: Resources: ImagesBucket: Type: AWS::S3::Bucket Properties: BucketName: !Sub "${ProjectName}-${UniqueKey}-images" ResizeFunction: Type: AWS::Serverless::Function Properties: FunctionName: resize # … Events: CreateThumbnailEvent: Type: S3 Properties: Bucket: !Ref ImagesBucket Events:… continue reading.