amazon-cloudformation

How do I cloudform an API gateway resource with a lambda proxy integration

╄→尐↘猪︶ㄣ 提交于 2019-12-03 05:55:41
I've been trying to work out how to express (in cloudformation) an API Gateway Resource that has a Lambda function integration type using the Lambda Proxy integration. This is easy to do in the AWS console as there is a check box that you can select: However there is no corresponding field in the AWS::ApiGateway::Method CloudFormation resource (it should be in the Integration property ). How can I configure this in cloudformation? The Integration type should be set to AWS_PROXY . An example snippet of a method from a working YAML CloudFormation template is below. ProxyResourceAny: Type: AWS:

CloudFormation doesn't deploy to API gateway stages on update

别说谁变了你拦得住时间么 提交于 2019-12-03 05:34:09
问题 When I run CloudFormation deploy using a template with API Gateway resources, the first time I run it, it creates and deploys to stages. The subsequent times I run it, it updates the resources but doesn't deploy to stages. Is that behaviour as intended? If yes, how'd I get it to deploy to stages whenever it updates? (Terraform mentions a similar issue: https://github.com/hashicorp/terraform/issues/6613) 回答1: Seems like there is no way to easily create a new Deployment whenever one of your

How to specify all ports in Security group - CloudFormation

纵饮孤独 提交于 2019-12-03 05:21:23
I have my CloudFormation script like this now: "SecurityGroupIngress" : [{ "IpProtocol" : "tcp", "FromPort" : "0", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }] and it looks like this, which is fine: But I am wondering how to I update the template to get this: Notice the Ports say All. I also wonder if they are different? The original solution I posted (and accepted by the original poster) stopped working as AWS no longer supports it. To avoid the barrage of downvotes, I deleted the answer. The alternatives are: Specify the ports 0 and 65535 or Open all ports for all protocols not just TCP (as

Can't create a SNS Event source on a Lambda function using CloudFormation

非 Y 不嫁゛ 提交于 2019-12-03 04:58:56
This is the Cloudformation template code related to my problem: "SNSTopic": { "Type": "AWS::SNS::Topic", "Properties": { "TopicName": "JumpboxPresenceTopic", "DisplayName": "Jumpbox Presence Topic", "Subscription": [ { "Endpoint": { "Fn::GetAtt": [ "Lambda", "Arn" ] }, "Protocol": "lambda" } ] } }, "Lambda": { "Type": "AWS::Lambda::Function", "Properties": [...] I can see the topic in the SNS dashboard: But it does not display in the lambda function Event Sources panel: The weird thing about this, is that if I create a new subscription from the SNS dashboard for that same lambda function, no

Cloudformation Cognito - how to setup App Client Settings, Domain, and Federated Identities via SAM template

天大地大妈咪最大 提交于 2019-12-03 04:15:48
问题 I already have my cognito user pool cloudformation template working, and have it integrated to my api gateway. But somehow i still have to manually configure the app client settings, domain, and federated identities to have a working login portal for the users. I have been looking here and there for possible solutions in automating these, but i cannot seem to find anything close to it. I would like to automate the configuration of the app client settings, domain, and federated identities via

User is not authorized to perform: cloudformation:CreateStack

拥有回忆 提交于 2019-12-03 02:57:33
问题 I'm trying out Serverless to create AWS Lambdas and while creating a project using the command serverless project create I'm getting the following error. AccessDenied: User: arn:aws:iam::XXXXXXXXX:user/XXXXXXXXX is not authorized to perform: cloudformation:CreateStack on resource: arn:aws:cloudformation:us-east-1:XXXXXXXXX:stack/XXXXXXXXX-development-r/* I have created a user and granted the following permissions to the user. AWSLambdaFullAccess AmazonS3FullAccess CloudFrontFullAccess

AWS Stack update error: Requires capabilities : [CAPABILITY_IAM]

天大地大妈咪最大 提交于 2019-12-03 00:59:51
When creating a stack with CloudFormation, I get this error: Stack update error: Requires capabilities : [CAPABILITY_IAM] I can't find a template for adding CAPABILITIES_IAM to the CloudFormation configuration. What are the options for resolving CAPABILITIES_IAM errors Eric Nord Turns out you need to check a box on the last screen of the stack creation. In CodePipeline CloudFormation you can add it like this to allow execution of the created change_set in the deploy action: Configuration: StackName: !Ref GitHubRepository ActionMode: CHANGE_SET_REPLACE Capabilities: CAPABILITY_NAMED_IAM RoleArn

AWS Export configuration as cloudformation template

别等时光非礼了梦想. 提交于 2019-12-02 23:21:13
I´m using AWS CLI and cloudformation, and I could not find any reference in the documentation. Anybody knows if it´s possible create a cloudformation template from a current configuration. Let´s say that I want to get a cloudformation templates from my current security group configuration. Any idea if it´s possible export that configuration as a template using command line? Regards. Based on our experience we found 2 possible ways to translate existing manually deployed (from Web Console UI) AWS infra to Cloudformation (CF). Using aws cli execute $aws service_name_here describe for each

What to bake into an AWS AMI and what to provision using cloud-init?

跟風遠走 提交于 2019-12-02 22:24:56
I'm using AWS Cloudformation to setup numerous elements of network infrastructure (VPCs, SecurityGroups, Subnets, Autoscaling groups, etc) for my web application. I want the whole process to be automated. I want click a button and be able to fire up the whole thing. I have successfully created a Cloudformation template that sets up all this network infrastructure. However the EC2 instances are currently launched without any needed software on them. Now I'm trying to figure out how best to get that software on them. To do this, I'm creating AMIs using Packer.io . But some people have instead

create folder inside S3 bucket using Cloudformation

北战南征 提交于 2019-12-02 22:21:20
I'm able to create an S3 bucket using cloudformation but would like to create a folder inside an S3 bucket..like <mybucket>--><myfolder> Please let me know the template to be used to create a folder inside a bucket ...both should be created at the sametime... I'm Using AWS lambda as below stackname = 'myStack' client = boto3.client('cloudformation') response = client.create_stack( StackName= (stackname), TemplateURL= 'https://s3.amazonaws.com/<myS3bucket>/<myfolder>/nestedstack.json', Parameters=<params> ) AWS doesn't provide an official CloudFormation resource to create objects within an S3