amazon-cloudformation

Access API gateway endpoint in cloudformation using custom resource

拈花ヽ惹草 提交于 2020-05-31 04:06:11
问题 I want to be able to call a API gateway endpoint from within cloudformation and parse the response from the output and pass in relevant information to one of the other service in the cloudformation. I have an api endpoint https://123x123x.execute-api.eu-west-2.amazonaws.com/myendpoint/tenants with x-api-key: b8Yk6m63rq8XRnMDKa2PeWE3KvBcU7ZyFIn0Vvrty Content-Type: application/json which returns { "tenants": [ { "tenantId": "tenant-1234", "AZ": "us-west-2c", "tenantUsers": 24, "instanceType":

Adding name to EC2 instances when deploying AWS::EKS::Nodegroup in CloudFormation

不羁的心 提交于 2020-05-30 10:15:09
问题 I'm creating a CloudFormation template to deploy an EKS node group using the AWS::EKS::Nodegroup CloudFormation resource. It looks like you can create tags for the node group resource specifically, but cannot change the name of the EC2 instances that are deployed as part of the node group. From the AWS documentation, it looks like tags are not propagated to other resources the node group deploys (such as EC2 instances). Does anyone know of a way on how we can update the name of the EC2

Can UsePreviousTemplate (in CloudFormation UpdateStack) be used together with nested stacks

白昼怎懂夜的黑 提交于 2020-05-30 09:48:32
问题 Using nested stacks is a best practice in AWS CloudFormation, and indeed they solve many problems (code reuse, stack limits, etc). When updating a stack (either through UpdateStack or ChangeSets), one can provide UsePreviousTemplate=True in order to instruct CloudFormation to use whatever template is currently live for the stack. This is useful if all you want to is update some parameters, and especially if you have some automated script doing the update (we update a parameter with the SHA of

Can UsePreviousTemplate (in CloudFormation UpdateStack) be used together with nested stacks

[亡魂溺海] 提交于 2020-05-30 09:47:46
问题 Using nested stacks is a best practice in AWS CloudFormation, and indeed they solve many problems (code reuse, stack limits, etc). When updating a stack (either through UpdateStack or ChangeSets), one can provide UsePreviousTemplate=True in order to instruct CloudFormation to use whatever template is currently live for the stack. This is useful if all you want to is update some parameters, and especially if you have some automated script doing the update (we update a parameter with the SHA of

Cloudfront give Access denied response created through AWS CDK Python for S3 bucket origin without public Access

谁说我不能喝 提交于 2020-05-16 07:52:06
问题 Created Cloud Front web distribution with AWS CDK for S3 bucket without public access. Able to create Origin access identity, and deploy but on successful deploy i get access denied response on browser. Grant Read Permissions on Bucket from Origin settings will be set to No, setting this to Yes manually everything will work fine, but this setting needs to be achieved through AWS CDK and python. Below is my code. from aws_cdk import aws_cloudfront as front, aws_s3 as s3 class CloudFrontStack

Cloudformation template completes deployment before UserData is finished

℡╲_俬逩灬. 提交于 2020-05-15 05:28:50
问题 In the CloudFormation template I am deploying, I am running a few commands in the UserData block. One of these commands starts up a session for NICE DCV: https://aws.amazon.com/hpc/dcv/ It looks as follows: "UserData": { "Fn::Base64" : { "Fn::Join" : [ "", [ dcv create-session --type virtual ", " --owner ubuntu", " --user ubuntu", " my-session, "\n", "while ! (dcv list-sessions | grep -q 'my-session'); do sleep 1; done\n" ] ] } } First, I create a session with command: $ dcv create-session -

The target group does not have an associated load balancer

风格不统一 提交于 2020-05-12 11:09:47
问题 I want to create ECS service from Cloud Formation Script. The service needs to be exposed to outside with Application Load Balancer I have created Elastic Load Balancer, a Listener and ListnerRule Resources: Vpc: Type: 'AWS::EC2::VPC' Properties: CidrBlock: 10.0.0.0/16 EnableDnsSupport: 'true' EnableDnsHostnames: 'true' Metadata: 'AWS::CloudFormation::Designer': id: 0e3933ae-23c2-44e1-a0d9-82fcfba93511 PubSubnetAz1: Type: 'AWS::EC2::Subnet' Properties: VpcId: !Ref Vpc CidrBlock: 10.0.1.0/24

The target group does not have an associated load balancer

巧了我就是萌 提交于 2020-05-12 11:09:26
问题 I want to create ECS service from Cloud Formation Script. The service needs to be exposed to outside with Application Load Balancer I have created Elastic Load Balancer, a Listener and ListnerRule Resources: Vpc: Type: 'AWS::EC2::VPC' Properties: CidrBlock: 10.0.0.0/16 EnableDnsSupport: 'true' EnableDnsHostnames: 'true' Metadata: 'AWS::CloudFormation::Designer': id: 0e3933ae-23c2-44e1-a0d9-82fcfba93511 PubSubnetAz1: Type: 'AWS::EC2::Subnet' Properties: VpcId: !Ref Vpc CidrBlock: 10.0.1.0/24

Use CAPABILITY_AUTO_EXPAND for nested stacks on CloudFormation

匆匆过客 提交于 2020-05-10 04:16:06
问题 I am trying to use nested stack and when my ChangeSet is being executed, I got this error: Requires capabilities : [CAPABILITY_AUTO_EXPAND] I went and create a pipeline with cloudformation. This can be use to create a pipeline: Configuration: ActionMode: CHANGE_SET_REPLACE ChangeSetName: changeset RoleArn: ?? Capabilities: CAPABILITY_IAM StackName: appsync-graphql TemplatePath: BuildArtifact::output.yaml This can’t: Configuration: ActionMode: CHANGE_SET_REPLACE ChangeSetName: changeset

Preflight response 403 forbidden. How can I allow options method without x-api-key?

偶尔善良 提交于 2020-04-30 08:47:22
问题 I'm using SAM to create my API in cloudformation. I'm getting a 403 FORBIDDEN on my options method (thus also my preflight for my get method). How can I allow my options method to reply with 200 OK without my x-api-key? I've tried so many stackoverflow answers but none fit my SAM template format. I've tried all the different combinations of my AllowHeaders. I've ommited the x-api-key - still the same 403 FORBIDDEN. If I send my x-api-key in postman with my request I get a 200 OK, but in my