Created
January 7, 2018 01:29
-
-
Save GuidoS/c2ab75f909a51380dd00c3bf5316de28 to your computer and use it in GitHub Desktop.
trigger_n_glacier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Serverless: Packaging service... | |
Serverless: Excluding development dependencies... | |
Serverless: Uploading CloudFormation file to S3... | |
Serverless: Uploading artifacts... | |
Serverless: Uploading service .zip file to S3 (224 B)... | |
Serverless: Validating template... | |
Serverless: Updating Stack... | |
Serverless: Checking Stack update progress... | |
..... | |
Serverless: Operation failed! | |
Serverless Error --------------------------------------- | |
An error occurred: ResizeLambdaPermissionPhotosS3 - Encountered unsupported property LifecycleConfiguration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports.resize = (event, context, callback) => { | |
callback(null, response); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: my-service | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
resize: | |
handler: handler.resize | |
events: | |
- s3: photos | |
resources: | |
Resources: | |
S3BucketPhotos: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: my-custom-bucket-name | |
# add additional custom bucket configuration here | |
ResizeLambdaPermissionPhotosS3: | |
Type: "AWS::Lambda::Permission" | |
Properties: | |
FunctionName: | |
"Fn::GetAtt": | |
- ResizeLambdaFunction | |
- Arn | |
Principal: "s3.amazonaws.com" | |
Action: "lambda:InvokeFunction" | |
SourceAccount: | |
Ref: AWS::AccountId | |
SourceArn: "arn:aws:s3:::my-custom-bucket-name" | |
LifecycleConfiguration: | |
Rules: | |
- Id: GlacierRule | |
Prefix: glacier | |
Status: Enabled | |
ExpirationInDays: '365' | |
Transitions: | |
- TransitionInDays: '1' | |
StorageClass: Glacier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment