Skip to content

Instantly share code, notes, and snippets.

@GuidoS
Created January 7, 2018 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuidoS/c2ab75f909a51380dd00c3bf5316de28 to your computer and use it in GitHub Desktop.
Save GuidoS/c2ab75f909a51380dd00c3bf5316de28 to your computer and use it in GitHub Desktop.
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