amazon-elastic-beanstalk

Toggle Elastic Beanstalk load balancer off/on with Terraform?

允我心安 提交于 2021-01-29 21:03:58
问题 Load balancers cost an hourly rate (Re)creating EB costs uploads to S3 and takes a long time So for EB that is sitting idle (used only during development), just as EC2 can be scaled down to 0 instances, how can the load balancer be toggled off (and later toggled back on)? Could Terraform be employed, such that the absence of the ALB is detected and gets recreated with an apply? I already terminate EC2 instances under EB when idle, but all the while my unused load balancer is charging me!

Toggle Elastic Beanstalk load balancer off/on with Terraform?

落爺英雄遲暮 提交于 2021-01-29 18:41:47
问题 Load balancers cost an hourly rate (Re)creating EB costs uploads to S3 and takes a long time So for EB that is sitting idle (used only during development), just as EC2 can be scaled down to 0 instances, how can the load balancer be toggled off (and later toggled back on)? Could Terraform be employed, such that the absence of the ALB is detected and gets recreated with an apply? I already terminate EC2 instances under EB when idle, but all the while my unused load balancer is charging me!

Elastic Beanstalk Autoscaling Group Lifecycle Hooks

假装没事ソ 提交于 2021-01-29 17:32:19
问题 I would like to add lifecycle hooks to my Elastic Beanstalk's autoscaling group. I see how lifecycle hooks can be added to an autoscaling group through cloudformation, but I don't know how this can be done through Elastic Beanstalk. To create a lifecycle hook on an autoscaling group, you need the autoscaling group's name. This doesn't appear to be possible since the Elastic Beanstalk resource doesn't have an export for the ASG name. Type: AWS::AutoScaling::LifecycleHook Properties:

Amazon Elastic Beanstalk ebextension

折月煮酒 提交于 2021-01-29 10:52:19
问题 I want to config the nginx config with the ebextension at Amazon Elastic Beanstalk, The content of the conf as below: files: "/etc/nginx/conf.d/custom-nginx-proxy.conf" : mode: "000755" owner: "root" group: "root" content: | client_max_body_size 60M; contatiner_commands: reload_nginx: command: "sudo service nginx reload" but always got the error about the content, nginx: [emerg] unknown directive "files:" in /var/elasticbeanstalk/staging/nginx/conf.d/custom-nginx-proxy.conf:7 I put this file

How to get the ARN of the load balancer in .ebextensions?

浪尽此生 提交于 2021-01-29 07:48:02
问题 I want to add a cloudwatch alarm to an elastic beanstalk environment using ebextensions. So I created a .ebextensions/cloudwatch-alarms.confg file that looks like the following: Resources: ELBLatencyAlarm: Type: AWS::CloudWatch::Alarm Properties: AlarmDescription: { "Fn::Join" : ["", [{ "Ref" : "AWSEBEnvironmentName" }, ": HIGH ELB latency." ]]} Namespace: AWS/ApplicationELB MetricName: Latency Dimensions: - Name: LoadBalancer Value : "arn:aws:elasticloadbalancing:xx-xxxxxx-1:123456789012

Updating AWS Elastic Beanstalk environment: javax/xml/bind/JAXBException

依然范特西╮ 提交于 2021-01-29 07:21:33
问题 A created a simple Dynamic Web project in Eclipse. I try to Run on Server choosing the AWS Elastic Beanstalk. I get this error message: An internal error occurred during: " Updating AWS Elastic Beanstalk environment: test-env". javax/xml/bind/JAXBException How to solve this problem? Thanks! 来源: https://stackoverflow.com/questions/64198740/updating-aws-elastic-beanstalk-environment-javax-xml-bind-jaxbexception

Connection to Redis (ElastiCache) from ElasticBeanstalk EC2 Fails

主宰稳场 提交于 2021-01-29 04:44:32
问题 We're using ElasticBeanstalk to setup a few Node.js environments. For now, we are using Redis as our session store, which is set up in ElastiCache. When I ssh into the EC2 instance, and netcat the Redis store, I can confirm that the network allows a connection over port 6379: [ec2-user@<redacted>]$ nc -v <redacted>.usw2.cache.amazonaws.com 6379 Connection to <redacted>.usw2.cache.amazonaws.com 6379 port [tcp/*] succeeded! EC2 Security Group's Outbound Policy: 0.0.0.0/0 Redis Security Group's

Connection to Redis (ElastiCache) from ElasticBeanstalk EC2 Fails

空扰寡人 提交于 2021-01-29 04:42:02
问题 We're using ElasticBeanstalk to setup a few Node.js environments. For now, we are using Redis as our session store, which is set up in ElastiCache. When I ssh into the EC2 instance, and netcat the Redis store, I can confirm that the network allows a connection over port 6379: [ec2-user@<redacted>]$ nc -v <redacted>.usw2.cache.amazonaws.com 6379 Connection to <redacted>.usw2.cache.amazonaws.com 6379 port [tcp/*] succeeded! EC2 Security Group's Outbound Policy: 0.0.0.0/0 Redis Security Group's

4mb image file upload gives HTTP 413 error when uploading to production server

自古美人都是妖i 提交于 2021-01-29 04:32:35
问题 I'm trying to upload an image from the client to a server for processing and then on to an S3 AWS bucket. It works great on a local server but not on a live server. XMLHttpRequest cannot load https://api.parthenon-click.com/img_upload/cover. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.parthenon-click.com' is therefore not allowed access. The response had HTTP status code 413. I'm using ElasticBeanstalk PHP v5.4 for client server and Node

How do I fix this Elastic Beanstalk error when deploying a Flask app: Python 3.7.0 was not found on your system

試著忘記壹切 提交于 2021-01-28 19:42:30
问题 I am trying to deploy my Flask app using the EB CLI following this official AWS tutorial. I receive the error 'Create environment operation is complete, but with errors'. Observing the environment logs, the server seems to be lacking the correct Python version. Below are the EB environment details, my PipFile, the EB CLI output and the error in the deploy logs. How can I fix this problem? Environment details: Application name: server_eb Region: eu-west-2 Deployed Version: XXX Environment ID: