amazon-cloudformation

AWS ECS Create Scheduled Tasks (cron) via Cloudformation

不打扰是莪最后的温柔 提交于 2019-12-12 07:44:34
问题 We want to create ScheduledTasks in AWS ECS via CloudFormation. Is there a programmatic way to create via boto or cloudformation? 回答1: In order to define a scheduled ECS task in CloudFormation, you need to define a "AWS::Events::Rule" resource with an ECS task as a target. "TaskSchedule": { "Type": "AWS::Events::Rule", "Properties": { "Description": "dump data every workday at 10", "Name": "dump-data", "ScheduleExpression": "cron(0 10 ? * MON-FRI *)", "State": "ENABLED", "Targets": [ { "Id":

Aws cli cloudformation error seen on passing parameter value of type CommaDelimitedList

做~自己de王妃 提交于 2019-12-12 07:17:48
问题 I am seeing an invalid-type error for a CommaDelimitedList parameter value. The CF runs without any errors from the console. AWS CLI command: aws cloudformation create-stack --stack-name agkTestUserStack --template-body file://api_user.yaml --parameters ParameterKey=CustomUserName,ParameterValue="svc_TestUser" ParameterKey=GroupAssociations,ParameterValue="Dev,Test" Output: Parameter validation failed: Invalid type for parameter Parameters[1].ParameterValue, value: [u'Dev', u'Test'], type:

CloudFormation ElasticIP Parameter

杀马特。学长 韩版系。学妹 提交于 2019-12-12 07:01:19
问题 I have a CloudFormation template which adds OpenVPN to an existing VPC and requires an Elastic IP allocation ID as a parameter. It also adds the public IP address from the same Elastic IP to the OpenVPN instance configuration (in it's UserData section). I've currently implemented this as 2 parameters (using made-up defaults) i.e. Parameters: ElasticIpAddress: Description: >- IP Address of an Elastic IP. Type: String Default: 53.176.52.215 ElasticIpAllocationId: Description: >- Allocation id

Template validation error: Template error: unresolved condition dependency BackupSize in Fn::If

亡梦爱人 提交于 2019-12-12 06:58:10
问题 I am writing CF code to launch ec2 instance, this is what my code looks like: I am facing these 2 issues: 1) I get this error "Template validation error: Template error: unresolved condition dependency BackupSize in Fn::If" 2) I want to join Parameter Name and from Mappings USERDATA. (The remaining userdata works fine, but this join is not working and just puts the same code in the userdata. Can anyone help me out please? AWSTemplateFormatVersion: "2010-09-09" Description: "This template

AWS CloudFormation for Lambda and SNS Topic

北城以北 提交于 2019-12-12 06:48:28
问题 I have a cloud formation script which I am using to create a Lambda and SNS Topic. Here is the yml script for SNS Topic and Lambda creation, SampleSNSTopic: Type: AWS::SNS::Topic Properties: DisplayName: sampleTopic TopicName: sampleTopic SampleLambdaFunction: Type: AWS::Lambda::Function DependsOn: SampleSNSTopic Properties: Handler: index.handler Description: Sample Lambda function FunctionName: TestFunction Role: !Ref SomeRole Code: ZipFile: !Sub | var AWS = require("aws-sdk"); exports

How do I go about creating Elastic Beanstalk configuration files?

喜夏-厌秋 提交于 2019-12-12 06:35:40
问题 I am looking for advice about how I should approach the problem of creating Elastic Beanstalk configuration files. How do I go about constructing an Elastic Beanstalk configuration files? How do I know what to include or not include? Do I construct it by hand using the template reference or are they typically generated by a configuration tool? 回答1: You can modify the configuration of Elastic Beanstalk environments in multiple ways. One way is to place a folder with the name .ebextensions

Cloudformation template gives " Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type

喜夏-厌秋 提交于 2019-12-12 04:15:39
问题 I wrote a simple cloudformation template that should create an EC2 isntance on AWS. Cloudformation template gives " Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type." I looked up on this forum and they said "InstanceType" is missing. I am brand new to Cloud formation . Where should I put "InstanceTyp"? thanks much { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "AWS CloudFormation Sample Template EC2InstanceSample:

Cannot use the output of the inner (child ) template in the parent template in cloudformation

天涯浪子 提交于 2019-12-12 04:13:26
问题 I am trying to use the output of a cloudformation stack in another. I looked at some examoles such as https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough-crossstackref.html but it is very confusing and I could not make it work in my example: here is what I have: I have a beanstalk.json template and I output the sampleEnvironment I created in resource section: { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "sampleApplication": { "Type": "AWS::ElasticBeanstalk

How do I specify the subnet and VPC IDs in cloudformation?

帅比萌擦擦* 提交于 2019-12-12 03:46:11
问题 I don't want to create new subnets and VPCs I already have them created and I want my cloudformation template to use them. In what parameter do I specify this or I'm I confused as to how this works? When I look at the docs for "AWS::EC2::VPC" and "AWS::EC2::Subnet" it seems these resources are only for creating new VPCs and subnets is this correct? Should I just point the instance resource directly to the existing VPC and subnet I want it to use? Edit: For example if I have an instance

AWS - Automatic deployment (.NET) to CloudFormation stack

萝らか妹 提交于 2019-12-12 02:22:01
问题 I have managed to set up a stack using a CloudFormation template for .NET. I still haven't figured out how to deploy my application to the created stack. Also is there a way to automate the app deployment process? I have looked at AWS docs but most of them seem to use cloud-init which from my understanding is Linux only. Thanks 回答1: You need a combination of Userdata to fire off cfn-init (installed as part of the EC2Config scripts) and CloudInit::Metadata stuff to download the source. I've