aws-cdk

How to Import Security group from another stack using #AWS-CDK?

爱⌒轻易说出口 提交于 2019-12-11 03:56:43
问题 I would like to know how to import security group defined in another stack, and then use in current stack. I have tried this so far.. class relayStack extends cdk.Stack { public sg_relay: ec2.SecurityGroupRefProps constructor(parent: cdk.App, name: string, props: VPCProps) { super(parent, name, props); //#IMPORT VPC PROPS const vpc = ec2.VpcNetwork.import(this, 'VPC-Hottest100', props.infra.vpc); //#AUTOSCALING GROUP const asg_relayServer = new ec2.AutoScalingGroup(this, 'ASG_Relay', { vpc,

Passing in template parameters

本小妞迷上赌 提交于 2019-12-10 23:37:25
问题 We are looking into using aws-cdk in our CI/CD pipeline. We need to be able to pass parameters into the the template during the build so it can generate an artifact to use during deploy. I see we can use the cdk.json file to specify context properties, but this doesn't actually put the values into the CloudFormation template itself. Just gives you access to them in the code. I have tried something like this: const servicenameprop = new PipelinePrerequisitesProps(); servicenameprop.default =

How to install dependencies of lambda functions upon cdk build wtih AWS CDK

佐手、 提交于 2019-12-10 04:21:21
问题 When using AWS SAM I used to run build command which would go through all of my Lambda function packages and install their dependencies (run npm install on them). How can I achieve the same behavior with AWS CDK? It doesn't seem to do it automatically, or am I missing something? 回答1: This functionality really is missing. You'll need to write your own packaging. Keep in mind that lambda dependencies must be built on a system with the same architecture as the target system in AWS (Linux) if any

Does CDK perform orchestration ? apart from provisioning

孤街醉人 提交于 2019-12-02 21:20:36
问题 We used CloudFormation/Terraform for provisioning resources in AWS. Provisioning is about creating a new state or transforming one state to another. We used ansible tool to orchestrate provisioning Automation may be used on the single system. Orchestration takes the automation and coordinates the process between multiple systems. Usually because one system may be dependent on another system before it can accomplish its task. You cannot have orchestration without automation. So, Orchestration