Skip to content

Instantly share code, notes, and snippets.

@GuidoS
Created Jan 7, 2018
Embed
What would you like to do?
trigger_n_glacier
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.
'use strict';
module.exports.resize = (event, context, callback) => {
callback(null, response);
};
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