Hi guys,
I’m trying to use s3 service in my project.
I save costum variabel & use in my provider property
service: snapnext
custom:
imagesBucketName: snapnext-images
provider:
name: aws
runtime: nodejs6.10
iamRoleStatements: # IAM permissions granted to all functions
- Effect: Allow
Action:
- S3:GetObject
Resource:
- Fn::Join:
- ''
- - 'arn:aws:s3:::'
- '${self:custom.imagesBucketName}/*'
environment:
IMAGES_BUCKET_NAME: ${self:custom.imagesBucketName}
functions:
downloadImage: # Define a new Function
handler: functions/downloadImage.handler
events:
- http:
path: images
method: post
resources:
Resources:
ImagesBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.imagesBucketName}
AccessControl: PublicRead
plugins:
- serverless-offline
When I’m trying to deploy, I’m always getting an error message like this
Any idea why this happens?
And how to better way to debug in a serverless framework, especially for .yml file?
Many Thanks
