I have a question about connection between serverless frame work and S3.
For details, I want to give lambda function permission to access S3bucket and put object.
Your yml is not formatted, use ‘’’ before and after your yml snippet so it formats since formatting is critical with yml.
There is an example of how to specify an IAM policy for your function to access s3. Look at bullet point 2. I’m on mobile so I’ll include the answer inline later.
I tried this but seem to have a formatting issue. I’d like to grant read/write access to three existing buckets, new-image-bucket, baseline-image-bucket, delta-image-bucket. I’ve updated serverless.yml like so:
The CloudFormation template is invalid: Template error: every Fn::Join object requires two parameters, (1) a string delimiter and (2) a list of strings to be joined or a function that returns a list of strings (such as Fn::GetAZs) to be joined.