I am trying to add the following Event Pattern to specific rule on Event Bridge I tryed to use this python code but the “source” does not accept a json, only string array: So I decided to try using dumps: but does not work as expected, with result: Is there any way to add “anything-but” rule in source, or this
Tag: aws-cdk
How to install python 3.9 on Amazon Linux 2 with cloud-init and CDK
I’m trying to install Python 3.9 an EC2 instance that uses Amazon Linux 2. I tried following this guide: https://computingforgeeks.com/install-latest-python-on-centos-linux/, and I was able to install Python3.9 manually on the EC2 instance by SSH’ing in and running the commands. I’m now trying to setup the EC2 instance with a UserData script that calls some CloudFormationInit scripts to install dependencies, including
How to attach a managed policy to a an IAM role using the CDK
I’m try to create a service role for AWS CodeBuild. I can create a role like this: Now I need to attach the Amazon-provided AWSCodeBuildAdminAccess policy to the role. How can I do this using the CDK? Answer You can get access to the policy like this: And attach it to your role like this:
AWS CDK How to include principals in IAM policy?
Hi I am working on AWS CDK. I am trying to create resource based policy. Below is my cloud formation template. Below I am trying to create same using CDK. This results in below error Error: Expected object reference, got “arn:aws:iam::123:root” Can someone help me to write correct syntax using python? Any help would be appreciated. Thanks Answer principals needs
How to install external modules in a Python Lambda Function created by AWS CDK?
I’m using the Python AWS CDK in Cloud9 and I’m deploying a simple Lambda function that is supposed to send an API request to Atlassian’s API when an Object is uploaded to an S3 Bucket (also created by the CDK). Here is my code for CDK Stack: The lambda function code uses the requests module which I’ve imported. However, when