amazon-cloudformation

AWS Lambda scheduled event source via cloudformation

懵懂的女人 提交于 2019-12-20 09:14:28
问题 I already have my lambda / roles defined in cloudformation and would love to also use it to add a scheduled eventsources ... are there any docs or examples around ? 回答1: Use Aws::Event::Rule with a ScheduleExpression and a AWS::Lambda::Permission // rule to periodically call the lambda "TagWatcherRule": { "Type": "AWS::Events::Rule", "Properties": { "ScheduleExpression": "rate(10 minutes)", "Targets": [ { "Id": "TagWatcherScheduler", "Arn": { "Fn::GetAtt": [ "TagWatcherFunction", "Arn" ] } }

How to create variable number of EC2 instance resources in Cloudformation template?

半世苍凉 提交于 2019-12-20 08:49:12
问题 How to create variable number of EC2 instance resources in Cloudformation template, according to a template parameter? The EC2 API and management tools allow launching multiple instances of the same AMI, but I can't find how to do this using Cloudformation. 回答1: The AWS::EC2::Instance Resource doesn't support the MinCount / MaxCount parameters of the underlying RunInstances API, so it's not possible to create a variable number of EC2 instances by passing Parameters to a single copy of this

What is the difference between Elastic Beanstalk and CloudFormation for a .NET project?

杀马特。学长 韩版系。学妹 提交于 2019-12-20 08:03:07
问题 I have developed a .NET MVC application and have started playing around with AWS and deploying it via the Visual Studio Toolkit. I have successfully deployed the application using the Elastic Beanstalk option in the toolkit. As I was going over the tutorials for deploying .NET apps to AWS with the toolkit, I noticed there are tutorials for deploying with both Elastic Beanstalk and CloudFormation. What is the difference between these two? From what I can tell, it seems like they both

Null values passed to cloudformation module - ansible

徘徊边缘 提交于 2019-12-20 02:54:15
问题 Ansible cloudformation module uses these environment variables of shell: $ export AWS_PROFILE=djangoapp $ export AWS_DEFAULT_REGION=ca-central-1 $ aws configure list Name Value Type Location ---- ----- ---- -------- profile djangoapp manual --profile access_key ****************WKWG shared-credentials-file secret_key ****************/I4Z shared-credentials-file region ca-central-1 env AWS_DEFAULT_REGION ./site.yml --- - name: Todobackend deployment playbook hosts: localhost connection: local

Is there a way to parameterize cloud formation resource names?

回眸只為那壹抹淺笑 提交于 2019-12-20 02:48:37
问题 I'm trying to make AutoScalingGroup names on cloud formation templates dynamic. I was thinking if this is possible via parameters, or any other way? "DynamicASGName": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { ...properties here... } } 回答1: CloudFormation uses two sets of names: the logical resource name, to identify a resource within the stack, and the physical name which uniquely identifies it across the whole region. CloudFormation doesn't support setting the logical

Cloudformation does not support create vpc links in apigateway

时光总嘲笑我的痴心妄想 提交于 2019-12-19 21:27:32
问题 In aws api gateway there is a section called API Link and I can manually set that. The problem is I cannot find any section in cloudformation documentation on how I can create vpc link via cloud formation on api gateway. Is it sth that cloudformation does not support or am I missing it? 回答1: You can use swagger to define an API Gateway using VPC Link. This is a complete CloudFormation template you can deploy to test it out... { "AWSTemplateFormatVersion": "2010-09-09", "Description": "Test

AWS lambda: No module named 'cfnresponse'

假装没事ソ 提交于 2019-12-19 19:44:37
问题 I have deployed an AWS lambda which contains: import json import boto3 import cfnresponse import urllib.request from botocore.exceptions import ClientError def lambda_handler(event, context): ... cfnresponse.send(event, context, status, responseData, "CustomResourcePhysicalID") I tried to get the values of the cfnresponse in my cloudformations: Resources: API: Type: Custom::API Version: '1.0' Properties: ServiceToken: arn:aws:lambda:eu-west-1:1234567891011:function:getCountry Outputs: Status:

Deploy IIS Website with CloudFormation template

时光总嘲笑我的痴心妄想 提交于 2019-12-19 03:32:30
问题 I have a Visual Studio (C#) deployment package (.zip) that I have pushed up to my S3 storage. I want to run my CloudFormation script and have it create an instance of an IIS server (I have the script for this) and then deploy the Visual Studio web site to it from the S3 storage. I'm looking for an example of the temple json that would do that 回答1: I have a template that does something similar to what you are looking for. Below is a template that I use. It may be more than you need, because it

Deploy IIS Website with CloudFormation template

不打扰是莪最后的温柔 提交于 2019-12-19 03:32:24
问题 I have a Visual Studio (C#) deployment package (.zip) that I have pushed up to my S3 storage. I want to run my CloudFormation script and have it create an instance of an IIS server (I have the script for this) and then deploy the Visual Studio web site to it from the S3 storage. I'm looking for an example of the temple json that would do that 回答1: I have a template that does something similar to what you are looking for. Below is a template that I use. It may be more than you need, because it

How do I force a CloudFormation stack to update when the parameter is updated?

泄露秘密 提交于 2019-12-18 16:48:35
问题 I am running a AWS CloudFormation stack that takes in some parameters and launches EC2 instances along with other AWS resources. The parameters are fed into the user data of the EC2 instance and based on that changes are made dynamically to the web application residing on the EC2 instance. UserData: Fn::Base64: Fn::Join: - "" - - "#!/bin/bash \n" - "sh website-conf/website_mysql_config.sh " - " -c \"" - Ref: "CompanyName" As shown in the example above, CompanyName is one of the many