Categories - Amazon Elastic Beanstalk
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Categories

This topic provides more specific troubleshooting tips by category.

Connectivity

Issue: Servers that were created in the Elastic Beanstalk console do not appear in the Toolkit for Eclipse

You can manually import servers by following the instructions at Importing existing environments into Eclipse.

Issue: Unable to connect to Amazon RDS from Elastic Beanstalk.

To connect a decoupled Amazon RDS to your Elastic Beanstalk application, do the following:

  • Make sure RDS is in the same Region as your Elastic Beanstalk application.

  • Make sure the RDS security group for your instance has an authorization for the Amazon EC2 security group you are using for your Elastic Beanstalk environment. For instructions on how to find the name of your EC2 security group using the Amazon Management Console, see Security groups. For more information about configuring your EC2 security group, go to the "Authorizing Network Access to an Amazon EC2 Security Group" section of Working with DB Security Groups in the Amazon Relational Database Service User Guide.

  • For Java, make sure the MySQL JAR file is in your WEB-INF/lib. See Adding an Amazon RDS DB instance to your Java application environment for more details.

Environment creation and instance launches

Event: Failed to Launch Environment

This event occurs when Elastic Beanstalk attempts to launch an environment and encounters failures along the way. Previous events on the Events page will alert you to the root cause of this issue.

Event: Create environment operation is complete, but with command timeouts. Try increasing the timeout period.

Your application may take a long time to deploy if you use configuration files that run commands on the instance, download large files, or install packages. Increase the command timeout to give your application more time to start running during deployments.

Event: The following resource(s) failed to create: [AWSEBInstanceLaunchWaitCondition]

This message indicates that your environment's Amazon EC2 instances did not communicate to Elastic Beanstalk that they were launched successfully. This can occur if the instances do not have Internet connectivity. If you configured your environment to launch instances in a private VPC subnet, ensure that the subnet has a NAT to allow the instances to connect to Elastic Beanstalk.

Event: A Service Role is required in this region. Please add a Service Role option to the environment.

Elastic Beanstalk uses a service role to monitor the resources in your environment and support managed platform updates. See Managing Elastic Beanstalk service roles for more information.

Deployments

Issue: Application becomes unavailable during deployments

Because Elastic Beanstalk uses a drop-in upgrade process, there might be a few seconds of downtime. Use rolling deployments to minimize the effect of deployments on your production environments.

Event: Failed to create the Amazon Elastic Beanstalk application version

Your application source bundle may be too large, or you may have reached the application version quota.

Event: Update environment operation is complete, but with command timeouts. Try increasing the timeout period.

Your application may take a long time to deploy if you use configuration files that run commands on the instance, download large files, or install packages. Increase the command timeout to give your application more time to start running during deployments.

Health

Event: CPU Utilization Exceeds 95.00%

Try running more instances, or choose a different instance type.

Event: Elastic Load Balancer awseb-myapp Has Zero Healthy Instances

If your application appears to be working, make sure that your application’s health check URL is configured correctly. If not, check the Health screen and environment logs for more information.

Event: Elastic Load Balancer awseb-myapp Cannot Be Found

Your environment's load balancer may have been removed out-of-band. Only make changes to your environment's resources with the configuration options and extensibility provided by Elastic Beanstalk. Rebuild your environment or launch a new one.

Event: EC2 Instance Launch Failure. Waiting for a New EC2 Instance to Launch...

Availability for your environment's instance type may be low, or you may have reached the instance quota for your account. Check the service health dashboard to ensure that the Elastic Compute Cloud (Amazon EC2) service is green, or request a quota increase.

Configuration

Event: You cannot configure an Elastic Beanstalk environment with values for both the Elastic Load Balancing Target option and Application Healthcheck URL option

The Target option in the aws:elb:healthcheck namespace is deprecated. Remove the Target option namespace) from your environment and try updating again.

Event: ELB cannot be attached to multiple subnets in the same AZ.

This message can be seen if you try to move a load balancer between subnets in the same Availability Zone. Changing subnets on the load balancer requires moving it out of the original availability zone(s) and then back into the original with the desired subnets. During the process, all of your instances will be migrated between AZs, causing significant downtime. Instead, consider creating a new environment and perform a CNAME swap.

Troubleshooting Docker containers

Event: Failed to pull Docker image :latest: Invalid repository name (), only [a-z0-9-_.] are allowed. Tail the logs for more details.

Check the syntax of the dockerrun.aws.json file using a JSON validator. Also verify the dockerfile contents against the requirements described in Docker configuration

Event: No EXPOSE directive found in Dockerfile, abort deployment

The Dockerfile or the dockerrun.aws.json file does not declare the container port. Use the EXPOSE instruction (Dockerfile) or Ports block (dockerrun.aws.json file) to expose a port for incoming traffic.

Event: Failed to download authentication credentials repository from bucket name

The dockerrun.aws.json provides an invalid EC2 key pair and/or S3 bucket for the .dockercfg file. Or, the instance profile does not have GetObject authorization for the S3 bucket. Verify that the .dockercfg file contains a valid S3 bucket and EC2 key pair. Grant permissions for the action s3:GetObject to the IAM role in the instance profile. For details, go to Managing Elastic Beanstalk instance profiles

Event: Activity execution failed, because: WARNING: Invalid auth configuration file

Your authentication file (config.json) is not formatted correctly. See Using images from a private repository

FAQ

Question: How can I change my application URL from myapp.us-west-2.elasticbeanstalk.com to www.myapp.com?

In a DNS server, register a CNAME record such as www.mydomain.com CNAME mydomain.elasticbeanstalk.com.

Question: How do I specify a specific Availability Zone for my Elastic Beanstalk application?

You can pick a specific Availability Zone by using the APIs, CLI, Eclipse plugin, or Visual Studio plugin. For instructions about using the Elastic Beanstalk console to specify an Availability Zone, see Auto Scaling group for your Elastic Beanstalk environment.

Question: How do I change my environment's instance type?

To change your environment's instance type go to the environment configuration page and choose Edit in the Instances configuration category. Then, select a new instance type and choose Apply to update your environment. After this, Elastic Beanstalk terminates all running instances and replaces them with new ones.

Question: How do I determine if anyone made configuration changes to an environment?

To see this information, in the navigation pane of the Elastic Beanstalk console choose Change history to display a list of configuration changes for all environments. This list includes the date and time of the change, the configuration parameter and value it was changed to, and the IAM user that made the change. For more information, see Change history.

Question: Can I prevent Amazon EBS volumes from being deleted when instances are terminated?

Instances in your environment use Amazon EBS for storage; however, the root volume is deleted when an instance is terminated by Auto Scaling. We don'trecommend that you store state or other data on your instances. If needed, you can prevent volumes from being deleted with the Amazon CLI: $ aws ec2 modify-instance-attribute -b '/dev/sdc=<vol-id>:false as described in the Amazon CLI Reference.

Question: How do I delete personal information from my Elastic Beanstalk application?

Amazon resources that your Elastic Beanstalk application uses might store personal information. When you terminate an environment, Elastic Beanstalk terminates the resources that it created. Resources you added using configuration files are also terminated. However, if you created Amazon resources outside of your Elastic Beanstalk environment and associated them with your application, you might need to manually check that personal information that your application might have stored isn't retained. Throughout this developer guide, whenever we discuss creating additional resources, we also mention when you should consider deleting them.