-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Description:
IntelligentTieringConfigurations not defined for resource of type AWS::S3::Bucket
This happens only when there is a bucket launching lambda through S3 Events. Other buckets not triggering lambda are properly validated. Commenting out the Event property in the Lambda function also passes the validation.
Steps to reproduce the issue:
- Create a standard template with an S3 bucket as follows:
rRawBucket:
Type: AWS::S3::Bucket
Description: S3 bucket used for the source/raw data files.
DeletionPolicy: Retain
Properties:
BucketName: !Sub "${pApplication}-${pEnvironment}-${AWS::Region}-${AWS::AccountId}-raw"
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: 'aws:kms'
KMSMasterKeyID: !GetAtt rKMSKey.Arn
PublicAccessBlockConfiguration:
BlockPublicAcls: True
BlockPublicPolicy: True
IgnorePublicAcls: True
RestrictPublicBuckets: True
IntelligentTieringConfigurations:
- Id: IntelligentTieringConfiguraion
Status: Enabled
Tierings:
- AccessTier: "ARCHIVE_ACCESS"
Days: 90
- AccessTier: "DEEP_ARCHIVE_ACCESS"
Days: 180
rStateMachineTriggerFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: source/sm_trigger/
Handler: index.handler
Runtime: !Ref pStateMachineTriggerFunctionRuntime
Role: !GetAtt rStateMachineTriggerFunctionRole.Arn
Timeout: !Ref pStateMachineTriggerFunctionTimeout
MemorySize: !Ref pStateMachineTriggerFunctionMemorySize
Environment:
Variables:
APPLICATION: !Ref pApplication
ENVIRONMENT: !Ref pEnvironment
REGION: !Sub ${AWS::Region}
WORKFLOW_STATEMACHINE_ARN: !Ref rWorkflowStateMachine
Events:
S3Event:
Type: S3
Properties:
Bucket:
Ref: rRawBucket
Events: s3:ObjectCreated:*
- Attempt to deploy and see the error
sam deploy --config-env dev
Observed result:
Error: [InvalidResourceException('rRawBucket', 'property IntelligentTieringConfigurations not defined for resource of type AWS::S3::Bucket')] ('rRawBucket', 'property IntelligentTieringConfigurations not defined for resource of type AWS::S3::Bucket')
Expected result:
S3 bucket created.
Metadata
Metadata
Assignees
Labels
No labels