amazon-cloudformation

CloudFormation : Template RDS Mysql to Create DB, Tables, User, or Load Schema

家住魔仙堡 提交于 2020-01-23 05:26:55
问题 Using CloudFormation, I'm trying to figure out a few use cases. The first case is having an existing AWS RDS MySQL server, how to create a database, tables, and a user account though a CloudFormation template. After looking at the Cloudformation docs, I thought there could be a AWS::RDS::DBInstance property that would allow me to do this action; however, though I couldn't find how to specify a database host source (or I may have misread it) that would allow. aws-properties-rds-database

Create methods under / using CF for API Gateway

我是研究僧i 提交于 2020-01-23 04:11:48
问题 How do I create methods under API Gateway's root / folder using CF? So for example I have a Gateway that looks like the following: / OPTIONS POST However when trying to do that with CF I get: Resource's path part only allow a-zA-Z0-9._- and curly braces at the beginning and the end. So my PathPart is the offending line. ApiGate: Type: AWS::ApiGateway::Resource Properties: ParentId: !GetAtt - ApiGateApi - RootResourceId PathPart: '{/}' RestApiId: !Ref ApiGateApi I can change the PathPart to

Create methods under / using CF for API Gateway

↘锁芯ラ 提交于 2020-01-23 04:11:18
问题 How do I create methods under API Gateway's root / folder using CF? So for example I have a Gateway that looks like the following: / OPTIONS POST However when trying to do that with CF I get: Resource's path part only allow a-zA-Z0-9._- and curly braces at the beginning and the end. So my PathPart is the offending line. ApiGate: Type: AWS::ApiGateway::Resource Properties: ParentId: !GetAtt - ApiGateApi - RootResourceId PathPart: '{/}' RestApiId: !Ref ApiGateApi I can change the PathPart to

AWS CodePipeline error: Cross-account pass role is not allowed

假装没事ソ 提交于 2020-01-23 03:19:06
问题 I am trying to create an AWS CodePipeline that deploys the production code to a separate account. The code consists of a lambda function which is setup using a sam template and cloudformation. I have it currently deploying to the same account without error. I added another stage that has a manual approval action and after approval it should deploy to the other account. It fails with the following error: Cross-account pass role is not allowed (Service: AmazonCloudFormation; Status Code: 403;

What IAM permissions are needed to use CDK Deploy?

血红的双手。 提交于 2020-01-22 16:18:29
问题 My team has a pipeline which runs under an execution IAM role. We want to deploy code to AWS through CloudFormation or the CDK. In the past, we would upload some artifacts to S3 buckets before creating/updating our CloudFormation stack, using the execution IAM role. We recently switched to the CDK, and are trying to get as much automated with using CDK Deploy as possible, but are running into a lot of permission items we need to add which we didn't have prior (for instance, cloudformation

What IAM permissions are needed to use CDK Deploy?

天涯浪子 提交于 2020-01-22 16:18:05
问题 My team has a pipeline which runs under an execution IAM role. We want to deploy code to AWS through CloudFormation or the CDK. In the past, we would upload some artifacts to S3 buckets before creating/updating our CloudFormation stack, using the execution IAM role. We recently switched to the CDK, and are trying to get as much automated with using CDK Deploy as possible, but are running into a lot of permission items we need to add which we didn't have prior (for instance, cloudformation

Handle optional function arguments

这一生的挚爱 提交于 2020-01-17 06:14:05
问题 Trying to make a reusable function that can take up to 4 parameters (though the solution it should be arbitrary). I want to zip these with parameters for AWS CloudFormation such that if I don't pass a positional argument to update_stack it won't get included in CF_ARGS . ## # Update the stack with the given template # @param: stack_name # @param: template_body # @param: [tags] # @param: [parameters] ## update_stack() { # Handle optional func parameters CF_PARAMS=("--stack-name" "--template

How to add a new statement to an existing SQS QueuePolicy from another template?

孤街浪徒 提交于 2020-01-16 09:19:29
问题 I have 2 services with different Cloudformation YAML templates and want to add another policy to a queue policy defined in producer service (to allow consumer to receive and delete messages). However, my current solution simply overrides the existing policy instead of appending it (i. e., only consumer service role remains in the policy). This is Cloudformation template SQS part for producer: ProducerQueuePolicy: Type: AWS::SQS::QueuePolicy Properties: PolicyDocument: Version: '2012-10-17' Id

AWS Glue+Athena skip header row

怎甘沉沦 提交于 2020-01-15 10:32:36
问题 As of January 19, 2018 updates, Athena can skip the header row of files, Support for ignoring headers. You can use the skip.header.line.count property when defining tables, to allow Athena to ignore headers. I use AWS Glue in Cloudformation to manage my Athena tables. Using the Glue Table Input, how can I tell Athena to skip the header row? 回答1: Basing off the full template for AWS::Glue::Table here, making the change from, Resources: ... MyGlueTable: ... Properties: ... TableInput: ...

Is it possible to statically specify AWS::StackName inside a cloudformation template?

泄露秘密 提交于 2020-01-14 14:39:09
问题 Is it possible to statically specify AWS::StackName inside a cloudformation template? Or can this only be specified as a parameter when you run the template? As far as I understand, this value can only be read via pseudo parameters, not set: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackname 回答1: No, you can't. Template is just a content of your stack, it doesn't set it's metainfo (like name, deployment region etc.). Note,