(aws-cdk): role parameter disappeared from CustomResources::Provider
See original GitHub issueDocumentation says (https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_custom-resources.Provider.html) that Provider has a “role” parameter. But trying to use an example from the doc leads to
File "/work/cdk/cdk/provisioners/eks/eks_cluster.py", line 71, in provision
my_provider = cr.Provider(self, "MyProvider",
File "/work/cdk/cdk/.venv/lib/python3.9/site-packages/jsii/_runtime.py", line 83, in __call__
inst = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'role'
Reproduction Steps
Just try first example in the docs https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.custom_resources/README.html
What did you expect to happen?
The example should work.
What actually happened?
TypeError: __init__() got an unexpected keyword argument 'role'
Environment
- CDK CLI Version : 1.109
- Framework Version:
- Node.js Version: v16.0.0
- OS : macOs
- Language (Version): Python 3.9.4
Other
Without a role parameter is is impossible to give a lambda permissions to perform the required operations. When AwsCustomResource can figure out permissions from the actions, Provider with lambda in the external code has no such possibility.
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Managing Missing CloudFormation Support with the AWS CDK
In this post I'll introduce the AWS SDK Custom Resource wrappers provided by the AWS CDK, which ease the creation of safe Custom...
Read more >aws-cdk/custom-resources module - AWS Documentation
Implements default behavior for physical resource IDs. The following code shows how the Provider construct is used in conjunction with a CustomResource and...
Read more >Delete Lambda-backed custom resources stuck in ...
Delete a custom resource that's stuck in DELETE_IN_PROGRESS status ; Functions, and then choose the function that you identified in step 1. For ......
Read more >class KubectlProvider (construct) · AWS CDK
Implements IConstruct , IConstruct , IDependable , ITaggable , IKubectlProvider. Implementation of Kubectl Lambda. Example. const handlerRole = iam.
Read more >Runtime context - AWS Cloud Development Kit (AWS CDK) v2
Get information about the runtime context through context providers. ... Gets a value from the current Region's Amazon EC2 Systems Manager Parameter Store....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After completely uninstalling node and npm and reinstalling everything from scratch, the example finally works.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.