我想自动化创建 RDS 的过程。我想创建 RDS Aurora。
部署应用程序时,验证堆栈 cloudFormation 并且出现错误:
发生错误:DatabaseCluster - 数据库实例和 EC2 安全组在不同的 VPC 中。
你能说有什么问题吗?
我关注了这篇文章在 Cloudformation 模板中创建 Postgres RDS 问题,但这不起作用。
这是我的 serverless.yml 文件的一部分
resources:
Resources:
DatabaseCluster:
Type: AWS::RDS::DBCluster
Properties:
DatabaseName: name${opt:stage, self:provider.stage}
Engine: aurora
MasterUsername: ${ssm:MasterUsername-${opt:stage, self:provider.stage}}
MasterUserPassword: ${ssm:MasterUserPassword-${opt:stage, self:provider.stage}}
Port: "3306"
VpcSecurityGroupIds:
- !Ref VpcSecurityGroup
ServerlessRDS:
Type: AWS::RDS::DBInstance
Properties:
Engine: aurora
DBClusterIdentifier: !Ref "DatabaseCluster"
DBInstanceIdentifier: db-name-${opt:stage, self:provider.stage}
DBInstanceClass: db.t2.medium
VPCSecurityGroups:
- !Ref VpcSecurityGroup
DBSubnetGroupName: !Ref myDBSubnetGroup
VpcSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: ServerlessVPC
GroupDescription: "Allow …Run Code Online (Sandbox Code Playgroud) amazon-ec2 amazon-web-services aws-cloudformation amazon-vpc amazon-aurora
我有一个 cognito 用户池,它作为身份提供者连接到 google(以便我可以使用 gmail 帐户登录)。我还有一个带有文件 () 的私人存储桶 s3。如何使用我的 lambda 函数,使用 Cognito(AcessToken,IdToken)返回的令牌来访问我的非公开 s3 存储桶?
我只想使用我的认知来访问我在 s3 上的私人文件。
类似于仅用于 s3 存储桶的 lambda 函数的 Cognito 授权器。
amazon-s3 amazon-web-services amazon-cognito serverless-framework