Reputation: 1
I'm encountering an error during AWS CloudFormation deployment where the properties validation for a resource is failing with the following message:
Properties validation failed for resource MyFunction with message: #/Role: failed validation constraint for keyword [pattern].
I'm trying to deploy a Serverless Function using AWS SAM (Serverless Application Model). Here's an excerpt from my SAM template.
Resources: MyFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://my-bucket/my-function.zip Handler: app.lambda_handler Runtime: python3.8 Events: MyApi: Type: Api Properties: Path: /my-api Method: GET Role: !Ref MyLambdaExecutionRole
MyLambdaExecutionRole: Type: AWS::IAM::Role Properties: # Role properties here...
I've double-checked that the IAM role referenced by MyLambdaExecutionRole exists in my AWS account. The logical ID in the Role property matches the one defined for the IAM role resource. However, I'm still getting the pattern validation error for the Role property.
What could be the possible cause of this error? How can I resolve it?
Any help or guidance would be greatly appreciated. Thank you!
I've double-checked that the IAM role referenced by MyLambdaExecutionRole exists in my AWS account. The logical ID in the Role property matches the one defined for the IAM role resource. However, I'm still getting the pattern validation error for the Role property.
What could be the possible cause of this error? How can I resolve it?
Any help or guidance would be greatly appreciated. Thank you!
Upvotes: 0
Views: 1606