-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
@aws-cdk/aws-samRelated to AWS Serverless Application ModelRelated to AWS Serverless Application ModelguidanceQuestion that needs advice or information.Question that needs advice or information.
Description
The property CfnFunctionProps.policies accepts a list of both objects and strings. However, when I try to generate a list with a string, an empty object is generated instead.
Reproduction Steps
Running cdk synth with the following construct:
new CfnFunction(scope, 'MyFunction', {
policies: ['AWSLambdaExecute']
});What did you expect to happen?
MyFunction:
Type: AWS::Serverless::Function
Properties:
Policies:
- AWSLambdaExecuteWhat actually happened?
MyFunction:
Type: AWS::Serverless::Function
Properties:
Policies:
- {}Environment
- CDK CLI Version : 1.80.0
- Framework Version:
- Node.js Version: 12.18.3
- OS : Ubuntu 19.10
- Language (Version):
Other
Note that if I use a string, instead of a list of strings, the output is correct.
new CfnFunction(scope, 'MyFunction', {
policies: 'AWSLambdaExecute'
}); MyFunction:
Type: AWS::Serverless::Function
Properties:
Policies: 'AWSLambdaExecute'This is 🐛 Bug Report
pavrda
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-samRelated to AWS Serverless Application ModelRelated to AWS Serverless Application ModelguidanceQuestion that needs advice or information.Question that needs advice or information.