amazon-cloudformation

AWS Cloudwatch Event Rule - Invoke Lambda - with Parameter

那年仲夏 提交于 2021-02-19 08:34:19
问题 I am using AWS Clouwatch Event Rule to invoke a python lambda function based on Cron Schedule which is working fine.Now can I pass parameter into this lambda function from cloudwatch even rule using AWS Cloudformation? Could you please guide? Please see below my cfn template : Step1 : parameter.Schedule=cron(0 21 ? * * *) Step 2: "Schedule": { "Description": "Schedule for the Lambda function (cron or rate)", "Type": "String" }, Step 3: "funcInvokeRule": { "Type": "AWS::Events::Rule",

Triggering a lambda from SNS using cloud-formation?

可紊 提交于 2021-02-19 06:16:05
问题 Triggering a lambda from SNS using cloud-formation? 回答1: What we do is that we don't point sns to an unqualified lambda, rather we point it to a lambda-alias. Basically, create a lambda, and then create an alias, use sns to point to the lambda-alias. When you have new code for lambda (your ci/cd can do the following), update lambda function code, create a new lambda version, and repoint your alias to the new version. This way you sns doesn't have to change at all with new lambda code drops.

AWS lambda read parameter or outputs from CloudFormation

故事扮演 提交于 2021-02-19 04:53:45
问题 Looks as really simple task but it's difficult to find good example on it. So, the task is following: AWS lambda puts some message to AWS-SQS. Code of AWS lambda contains such line: var QUEUE_URL = 'https://sqs.us-west-2.amazonaws.com/ID/QUEUE_NAME';", In order to get rid of this code there are possible two options: Create query that will lookup this queue based on region and queue name SQS has predictable names; Create Cloud Formaion script and specify these dependencies there. Based on this

Aurora Serverless password rotation setup using CloudFormation (and Lambda rotation templates)

杀马特。学长 韩版系。学妹 提交于 2021-02-19 03:20:00
问题 AWS has Fully Configured and Ready-to-Use Rotation Support for some supported RDS engines, including Amazon Aurora (Serverless also?) I'm trying to setup the password rotation in my CloudFormation template using AWS::SecretsManager::RotationSchedule (note that this is not a fully functional template, only an illustration): DBCluster: Type: AWS::RDS::DBCluster Properties: Engine : aurora EngineMode : serverless EngineVersion : 5.6.10a Secret: Type: AWS::SecretsManager::Secret Properties:

AWS Cloudformation Role is not authorized to perform AssumeRole on Role

可紊 提交于 2021-02-18 10:14:14
问题 I am trying to execute a cloudformation stack which contains the following resources: Codebuild project Codepipeline pipeline Roles needed While trying to execute the stack, it fails with the following error: arn:aws:iam::ACCOUNT_ID:role/CodePipelineRole is not authorized to perform AssumeRole on role arn:aws:iam::ACCOUNT_ID:role/CodePipelineRole (Service: AWSCodePipeline; Status Code: 400; Error Code: InvalidStructureException; Request ID: 7de2b1c6-a432-47e6-8208-2c0072ebaf4b) I created the

AWS Cloudformation Role is not authorized to perform AssumeRole on Role

[亡魂溺海] 提交于 2021-02-18 10:10:57
问题 I am trying to execute a cloudformation stack which contains the following resources: Codebuild project Codepipeline pipeline Roles needed While trying to execute the stack, it fails with the following error: arn:aws:iam::ACCOUNT_ID:role/CodePipelineRole is not authorized to perform AssumeRole on role arn:aws:iam::ACCOUNT_ID:role/CodePipelineRole (Service: AWSCodePipeline; Status Code: 400; Error Code: InvalidStructureException; Request ID: 7de2b1c6-a432-47e6-8208-2c0072ebaf4b) I created the

Cloudformation template for creating ECS service stuck in CREATE_IN_PROGRESS

烂漫一生 提交于 2021-02-17 21:06:37
问题 I am creating an AWS ECS service using Cloudformation. Everything seems to complete successfully, I can see the instance being attached to the load-balancer, the load-balancer is declaring the instance as being healthy, and if I hit the load-balancer I am successfully taken to my running container. Looking at the ECS control panel, I can see that the service has stabilised, and that everything is looking OK. I can also see that the container is stable, and is not being terminated/re-created.

AWS API Gateway with Custom Authorizer and CORS Intermittent 200 then 403 then 200 … Strange

回眸只為那壹抹淺笑 提交于 2021-02-16 14:48:11
问题 I have an 1 Amazon Api Gateway setup with a custom authorizer (the authorizer basically just returns allow for anything) I enabled CORS, and this is running from jQuery webpage. I have two method /vehicles (returns a list of car) /bookings (returns booking details) The behavior I am seeing, is the first request goes fine, I see it pull the OPTIONS , then perform a GET request. Then , I hit the other method the OPTIONS works, then the get returns a 403 , but if I launch the request again ( On

Can we export Cloud Formation template from an existing VPC?

和自甴很熟 提交于 2021-02-11 18:24:39
问题 We have a VPC which contains all services and databases used for the testing. We are now planning to setup another such VPC, so that we can have an extra testing env. Is there a way to export the CloudFormation template from the existing infrastructure ( VPC )? 回答1: Depends upon what all you want to clone/duplicate as well as to what level you would like to duplicate resources, you can look at following options; Use deprecated CloudFomer which is part of AWS CFN, you can built templates from

Can we export Cloud Formation template from an existing VPC?

不打扰是莪最后的温柔 提交于 2021-02-11 18:24:13
问题 We have a VPC which contains all services and databases used for the testing. We are now planning to setup another such VPC, so that we can have an extra testing env. Is there a way to export the CloudFormation template from the existing infrastructure ( VPC )? 回答1: Depends upon what all you want to clone/duplicate as well as to what level you would like to duplicate resources, you can look at following options; Use deprecated CloudFomer which is part of AWS CFN, you can built templates from