amazon-cloudformation

How to use AWS CloudFormation templates with Simple System Management and ElasticBeanstalk

﹥>﹥吖頭↗ 提交于 2021-01-28 07:29:33
问题 I am trying to use AWS CloudFormation templates together with SSM and ElasticBeanstalk, but get the following error: Service:AmazonCloudFormation, Message:Stack named 'awseb-e-dg6tmg2rmj-stack' aborted operation. Current state: 'UPDATE_ROLLBACK_IN_PROGRESS' Reason: The following resource(s) failed to create: [ssmParameter]. I basically need to retrieve values from SSM and use as environment variables on Amazon Linux. I have already researched and read all the related material on AWS

How do I add a cloudformation security group ingress rule that refers to another security group?

那年仲夏 提交于 2021-01-28 07:20:54
问题 I have the following security group in a yaml template. I'd like to have the "SecurityGroupApplication" security group allow incoming connections from the "SecurityGroupBastion". However, the validate-template function of the aws client is telling me unhelpful information like "unsupported structure". Ok, but what is wrong with the structure? Ideas? Resources: SecurityGroupBastion: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: Bastion security group SecurityGroupIngress: -

Is there a way of running AWS Step Functions locally when defined by CDK?

无人久伴 提交于 2021-01-28 05:44:42
问题 AWS Step Functions may be run in a local Docker environment using Step Functions Local Docker. However, the step functions need to be defined using the JSON-based Amazon States Language. This is not at all convenient if your AWS infrastructure (Step Functions plus lambdas) is defined using AWS CDK/CloudFormation. Is there a way to create the Amazon States Language definition of a state machine from the CDK or CloudFormation output, such that it’s possible to run the step functions locally? My

how to create a policy of ec2 cloudformation with instancetype t2.micro

回眸只為那壹抹淺笑 提交于 2021-01-28 05:24:56
问题 I am trying to create a policy where some user can lauch instance with amid:ami-0fc61db8544a617ed specific and instancetype:t2.micro in a specific region with specific storage like 8gb I have this template AWSTemplateFormatVersion: 2010-09-09 Description: --- Policita para usuarios test Parameters: GroupTest1Parameter: Type: String Default: GroupTest1 Description: Este es el valor de entrada GroupTest1Parameter Resources: PolictyTest1: Type: AWS::IAM::Policy Properties: PolicyName:

CloudFormation issue: couldn't delete stack

≡放荡痞女 提交于 2021-01-28 01:32:45
问题 I create CloudFormation template for our resources, it includes Lambda functions, API Gateways, Roles, etc. For verifying our template I create CloudFormation stack using it, check some resources which I updated and after that I delete stack. But last time I got such message when I tried to delete stack: CloudFormation is waiting for NetworkInterfaces associated with the Lambda Function to be cleaned up. I tried to stop deletion process and restart it, but I faced the same issue again. What

CloudFormation yaml - How to force number type?

こ雲淡風輕ζ 提交于 2021-01-27 21:14:39
问题 I'm trying to create an ECS task definition as part of a CloudFormation stack. My task definition so far looks like this... TaskDefinition: Type: AWS::ECS::TaskDefinition Properties: RequiresCompatibilities: - EC2 ExecutionRoleArn: !Ref MyTaskRole ContainerDefinitions: - Name: !Ref ServiceName Image: amazon/amazon-ecs-sample PortMappings: - ContainerPort: 3000 HostPort: 0 Protocol: tcp MemoryReservation: 128 When I try to run this, I get the following error... #/ContainerDefinitions/0

AWS - cfn-init not creating a file

霸气de小男生 提交于 2021-01-27 18:02:16
问题 I am new to cloudformation. I am using cfn-init to create a file. But doesnt create a file nor my stack fails. Stack successfully gets created with required resources like EC2 instance. Also it installs AWS CLI as mentioned in User data. But it just does not create file i wish to create. I tried using Advanced options of not allowing rollback of stack. But the /var/log/cfn-init.log does not get created. See the template below? Am I doing anything wrong in this? { "Parameters" : { "KeyName" :

How to get logical ID of resource with CDK?

泄露秘密 提交于 2021-01-27 05:52:33
问题 I'm attempting to write some tests for a CDK Construct that validates security group rules defined as part of the construct. The Construct looks something like the following. export interface SampleConstructProps extends StackProps { srcSecurityGroupId: string; } export class SampleConstruct extends Construct { securityGroup: SecurityGroup; constructor(scope: Construct, id: string, props: SampleConstructProps) { super(scope, id, props); // const vpc = Vpc.fromLookup(...); this.securityGroup =

How to get logical ID of resource with CDK?

孤人 提交于 2021-01-27 05:51:04
问题 I'm attempting to write some tests for a CDK Construct that validates security group rules defined as part of the construct. The Construct looks something like the following. export interface SampleConstructProps extends StackProps { srcSecurityGroupId: string; } export class SampleConstruct extends Construct { securityGroup: SecurityGroup; constructor(scope: Construct, id: string, props: SampleConstructProps) { super(scope, id, props); // const vpc = Vpc.fromLookup(...); this.securityGroup =

Is it possible to configure different API Gateway stages with different lambda versions using AWS SAM

…衆ロ難τιáo~ 提交于 2021-01-27 05:32:12
问题 I have a SAM template for my application. Each time I deploy my SAM template with a new API Gateway stage name, it replaces the previously created stage. So, found this article which helps me in releasing different versions pointing to different lambda versions. https://aws.amazon.com/blogs/compute/using-api-gateway-stage-variables-to-manage-lambda-functions/ But, for this, I have to change API Gateway manually after deployment. So, Is there any way that I can do this using AWS SAM ? For