amazon-web-services

Fargate Task with Nat Gateway fails to connect with RDS database

我的梦境 提交于 2021-02-11 14:34:54
问题 Basically, I'm follow these two guides: Deploying Hasura on AWS with Fargate, RDS and Terraform Deploying Containers on Amazon’s ECS using Fargate and Terraform: Part 2 I have: Postgres RDS Database deployed in 'Multi-AZ' My python/flask app deployed in Fargate across multiple AZ's I run a migration inside the task definition before the app ALB Load balancing between the tasks Logging for RDS, ECS and ALB into Cloudwatch Logs. A NAT gateway with an Elastic IP for each private subnet to get

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

AWS RDS keep user access with dynamic IP

匆匆过客 提交于 2021-02-11 14:15:12
问题 On AWS rds I added few postgres users. There is Security groups which needs IP addresses for access to DB instance right? So if user have static IP address, then I will add that once and there is no problem. But if user have dynamic address, only way I see is that periodically update IP's for keep users valid connections. My question is: if there is possible to keep dynamic IP users valid connections, without manually update security group data ? Thanks ! 回答1: Following are some of the

How to enable CloudWatch logging and X-ray for stepfunction in Terraform?

微笑、不失礼 提交于 2021-02-11 14:13:57
问题 In AWS console, we can easily enable cloudwatch logging and X-ray for a step function statemachine, but I want my resource fully managed by Terraform, from this page:https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sfn_state_machine It seems like Terraform doesn't support this at the moment (also see: https://github.com/hashicorp/terraform-provider-aws/issues/12192) Does anyone know if there is any workaround to achieve this? I'd really like to be able to enable

package.json it resets every time I try to do pnp install

不羁岁月 提交于 2021-02-11 14:13:56
问题 I'm trying to host my discord bot done in python using AWS . When I do nvm install it gives me this following warn: npm WARN saveError ENOENT: no such file or directory, open '/home/ubuntu/package.json' npm WARN enoent ENOENT: no such file or directory, open '/home/ubuntu/package.json' npm WARN ubuntu No description npm WARN ubuntu No repository field. npm WARN ubuntu No README data npm WARN ubuntu No license field. This is my package.json: { "lockfileVersion": 1, "name": "lol", "version": "1

package.json it resets every time I try to do pnp install

别来无恙 提交于 2021-02-11 14:12:04
问题 I'm trying to host my discord bot done in python using AWS . When I do nvm install it gives me this following warn: npm WARN saveError ENOENT: no such file or directory, open '/home/ubuntu/package.json' npm WARN enoent ENOENT: no such file or directory, open '/home/ubuntu/package.json' npm WARN ubuntu No description npm WARN ubuntu No repository field. npm WARN ubuntu No README data npm WARN ubuntu No license field. This is my package.json: { "lockfileVersion": 1, "name": "lol", "version": "1

AWS CodePipeline with ECS Blue/Green deployment fails with internal error

牧云@^-^@ 提交于 2021-02-11 14:05:11
问题 I have a CodePipeline set up where changes to code builds and pushes an image to ECR. I am looking to automate updating ECS with the new image as it is built. I have configured the ECS Blue/Green action but when it runs it fails almost immediately with a message about an "Internal Error". There is no failed deployment created in CodeDeploy. I have configured CodePipeline with two inputs: the source code used to build the image a zip in S3 containing the appspec.yaml and the taskdef.json When

Access MySQL server in private ec2 instance in nodejs

空扰寡人 提交于 2021-02-11 14:02:33
问题 I am new to AWS and Node js. I want to query a MySQL server in a private ec2 instance in a testing project which I am building using Node js. How should I go about it? Thanks EDIT: I want to access it through my local computer. The way I came up with was: Start a terminal from node js - don't know which method would be best Use the terminal to login into public ec2 connect to private ec2 through public instance launch the MySQL client through private instance and query it. I wanted to know if

Notify when AMI available

旧街凉风 提交于 2021-02-11 14:00:11
问题 anyone know how to synchronously call AWS Lambda when my new AMI is available? I'd like emphasize that I'm interested in AMI's available state, not just pending. Basically I'm looking for something like RDS Event for EC2. Flow: CreateAMIAPICall --> AMI ami-abc123 is beeing created (pending) --> AMI ami-abc123 is available --> ? --> TRIGGER AWS LAMBDA 回答1: You did not state the language you are using in Lambda, but boto3 has the capability! From EC2 — Boto 3 Docs: waiter = client.get_waiter(

Notify when AMI available

流过昼夜 提交于 2021-02-11 13:57:05
问题 anyone know how to synchronously call AWS Lambda when my new AMI is available? I'd like emphasize that I'm interested in AMI's available state, not just pending. Basically I'm looking for something like RDS Event for EC2. Flow: CreateAMIAPICall --> AMI ami-abc123 is beeing created (pending) --> AMI ami-abc123 is available --> ? --> TRIGGER AWS LAMBDA 回答1: You did not state the language you are using in Lambda, but boto3 has the capability! From EC2 — Boto 3 Docs: waiter = client.get_waiter(