Skip to content

Instantly share code, notes, and snippets.

@ducmeit1
Created July 5, 2019 07:34
Show Gist options
  • Save ducmeit1/581cc91d92c866ecf82dd8c041afc80a to your computer and use it in GitHub Desktop.
Save ducmeit1/581cc91d92c866ecf82dd8c041afc80a to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Specification template describing your function.
Resources:
resizeimage:
Type: 'AWS::Serverless::Function'
Properties:
Handler: main
Runtime: go1.x
CodeUri: .
Description: ''
MemorySize: 128
Timeout: 20
Role: 'arn:aws:iam::029859501136:role/service-role/resize-image-role-z94asgot'
Events:
BucketEvent1:
Type: S3
Properties:
Bucket:
Ref: Bucket1
Events:
- 's3:ObjectCreated:*'
Api1:
Type: Api
Properties:
Path: '/{proxy+}'
Method: GET
Environment:
Variables:
bucket: golang-resize-image
original_folder: original
regional: ap-southeast-1
resized_folder: resized
Bucket1:
Type: 'AWS::S3::Bucket'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment