Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service: firstApp
- provider:
- name: aws
- runtime: nodejs12.x
- region: ${opt:region, 'ap-southeast-1'}
- iamRoleStatements:
- - Effect: "Allow"
- Action:
- - "s3:*"
- Resource: "arn:aws:s3:::myapp/*"
- plugins:
- - serverless-offline
- functions:
- hello:
- handler: handler.hello
- events:
- - http: ANY {proxy+}
- cors: true
- resources:
- Resources:
- UploadBucket:
- Type: AWS::S3::Bucket
- Properties:
- BucketName: myapp
- AccessControl: PublicRead
- CorsConfiguration:
- CorsRules:
- - AllowedMethods:
- - GET
- - PUT
- - POST
- - HEAD
- AllowedOrigins:
- - "*"
- AllowedHeaders:
- - "*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement