You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin allows you to set default attributes a given CloudFormation resource
should have based on type.
This plugin affects resources generated by Serverless.
For example, any default attributes defined for S3 buckets will be applied to the Serverless-generated ServerlessDeploymentBucket bucket.
You are, however, able to exclude Serverless-generated resources using Exclude: (see below).
custom:
defaultAwsAttributes:
# Enable SSE and block public access for all S3 buckets# Also set a DeletionPolicy for all S3 buckets
- Type: AWS::S3::BucketDeletionPolicy: RetainProperties:
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: AES256PublicAccessBlockConfiguration:
BlockPublicAcls: trueBlockPublicPolicy: trueIgnorePublicAcls: trueRestrictPublicBuckets: true# Add logging configuration to all S3 buckets except resource with# logical ID 'LoggingBucket'
- Type: AWS::S3::BucketExclude:
- LoggingBucketProperties:
LoggingConfiguration:
DestinationBucketName:
Ref: LoggingBucket
About
Set default attributes a given CloudFormation resource should have based on type