amazon-cloudformation

SAM Template - API Authorizor to use existing Cognito User Pool

妖精的绣舞 提交于 2021-02-11 18:20:19
问题 UPDATE: Thanks for the help! I've updated the template.yml to include the Authorizer, but I'm getting an error still: HelloWorldApi: Type: AWS::Serverless::Api Properties: StageName: Prod Cors: "'*'" # Auth: # DefaultAuthorizer: MyCognitoAuthorizer # Authorizers: # MyCognitoAuthorizer: # UserPoolArn: arn:aws:cognito-idp:us-east-1:719235216593:userpool/my-user-pool-id HelloWorldFunction: Properties: CodeUri: hello-world/ Handler: app.lambdaHandler Runtime: nodejs10.x Events: HelloWorld: Type:

SAM Template - API Authorizor to use existing Cognito User Pool

北慕城南 提交于 2021-02-11 18:18:17
问题 UPDATE: Thanks for the help! I've updated the template.yml to include the Authorizer, but I'm getting an error still: HelloWorldApi: Type: AWS::Serverless::Api Properties: StageName: Prod Cors: "'*'" # Auth: # DefaultAuthorizer: MyCognitoAuthorizer # Authorizers: # MyCognitoAuthorizer: # UserPoolArn: arn:aws:cognito-idp:us-east-1:719235216593:userpool/my-user-pool-id HelloWorldFunction: Properties: CodeUri: hello-world/ Handler: app.lambdaHandler Runtime: nodejs10.x Events: HelloWorld: Type:

What are the action and resource to connect the RDS

最后都变了- 提交于 2021-02-11 14:25:29
问题 Lambda role have below permissions "Action" : "rds-db:connect" "Resource": "arn:aws:rds:*:6548938434:cluster:*" Code is below import pg8000 #region is us-east-2b client = boto3.client(service_name='rds', region_name='us-east-2') def lambda_handler(event,context): conn = pg8000.connect(database='postgres', user='test_user',\ password='1234567', \ host='abc-dev-chhd674.us-east-2.rds.amazonaws.com', \ port=5432, ssl_context=True) I have connection timed out issue 来源: https://stackoverflow.com

How to create change set for CloudFormation Template with Transform AWS::CodeDeployBlueGreen

左心房为你撑大大i 提交于 2021-02-11 10:00:56
问题 CloudFormation is failing to create a change set with status reason Template parameters modified by transform . This appears to be in reference to the AWS::CodeDeployBlueGreen transform applied to my template: AWSTemplateFormatVersion: '2010-09-09' Description: Stack Transform: - 'AWS::CodeDeployBlueGreen' # DEPLOYMENT HOOK Hooks: CodeDeployBlueGreenHook: ... This template contains all the resources required to run my application, including an ECS service with a task set which uses Blue/Green

Fn::ImportValue does not match type {Array}

两盒软妹~` 提交于 2021-02-10 04:47:42
问题 I faced an issue with using the export and import functionality in CloudFormation. When I tried to import a value which actually is a list (array) I received the following error message "does not match type {Array}". vpc.yaml (snippet) PrivateSubnets: Description: A list of the private subnets Value: !Join [",", [!Ref PrivateSubnetOne, !Ref PrivateSubnetTwo]] Export: Name: !Join ["-", [!Ref "Environment", "PrivateSubnets"] ] pipeline.yaml (snippet) Subnets: Fn::ImportValue: !Sub "$

Fn::ImportValue does not match type {Array}

删除回忆录丶 提交于 2021-02-10 04:47:39
问题 I faced an issue with using the export and import functionality in CloudFormation. When I tried to import a value which actually is a list (array) I received the following error message "does not match type {Array}". vpc.yaml (snippet) PrivateSubnets: Description: A list of the private subnets Value: !Join [",", [!Ref PrivateSubnetOne, !Ref PrivateSubnetTwo]] Export: Name: !Join ["-", [!Ref "Environment", "PrivateSubnets"] ] pipeline.yaml (snippet) Subnets: Fn::ImportValue: !Sub "$

Which AWS services does AWS CloudFormer support?

百般思念 提交于 2021-02-08 15:18:32
问题 AWS CloudFormation offers a default stack named CloudFormer, a template creation tool. CloudFormer creates a CloudFormation template from your current AWS environment, allowing you to click which manually created resources to include in your template. The AWS CloudFormer documentation does not list the AWS services that CloudFormer supports. There is an announcement from 2013 (CloudFormer Now Supports Amazon VPC and More AWS Resources) that lists a subset of supported services, but there is

How do I use nested lists or append to a list in Cloudformation?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-08 09:25:10
问题 I want to give this resource 2 security groups that exist outside the stack, plus one that was created as part of the stack... I have tried the below and received the error: Value of property SecurityGroups must be of type List of String SecurityGroups: - !FindInMap [ envMap, !Ref env, securityGroups ] - !GetAtt SG.GroupId for reference, here is my map Mappings: envMap: qa: "securityGroups": - sg-xxxxxxxx - sg-yyyyyyyy and here is the resource LoadBalancer: Type: 'AWS::ElasticLoadBalancingV2:

CloudFormation nested stack name

醉酒当歌 提交于 2021-02-07 12:51:09
问题 I need to set nested stack name explicitly in a CloudFormation template, but don't see such option in AWS documentation. Is there way to achieve this? I can specify stack name, when running a parent stack, but all nested stacks, got a randomly generated stack name, based on a resource name created, like: VPC: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://s3-eu-west-1.amazonaws.com/cf-templates-wtmg/vpc.yaml Parameters: EnvironmentName: !Ref AWS::StackName Which will

How to delete aws ECR repository which contain images through cloudformation?

耗尽温柔 提交于 2021-02-07 07:25:35
问题 How to delete aws ECR repository which contain images through cloudformation? getting below error while deleting it. The repository with name 'test' in registry with id '**********' cannot be deleted because it still contains images 回答1: I was able to do this by first deleting all images in ECR and then going back to CloudFormation and deleting again. Instructions for deleting images are here: https://docs.aws.amazon.com/AmazonECR/latest/userguide/delete_image.html. After I did that, I was