Skip to content
GitHubXDiscord

Application

The Application resource lets you manage AWS ElasticBeanstalk Applications and their associated settings and configurations.

Create a basic ElasticBeanstalk application with a name and description.

import AWS from "alchemy/aws/control";
const myApplication = await AWS.ElasticBeanstalk.Application("myApplication", {
ApplicationName: "MyWebApp",
Description: "This is my web application running on Elastic Beanstalk."
});

Configure an ElasticBeanstalk application with resource lifecycle settings for better management.

import AWS from "alchemy/aws/control";
const lifecycleConfig = {
ServiceRole: "arn:aws:iam::123456789012:role/elasticbeanstalk-service-role",
VersionLifecycleConfig: {
MaxCount: 10,
MaxAge: 30
}
};
const advancedApplication = await AWS.ElasticBeanstalk.Application("advancedApplication", {
ApplicationName: "AdvancedWebApp",
Description: "This application includes advanced lifecycle configurations.",
ResourceLifecycleConfig: lifecycleConfig
});

Adopt an existing ElasticBeanstalk application instead of failing if it already exists.

import AWS from "alchemy/aws/control";
const adoptExistingApp = await AWS.ElasticBeanstalk.Application("existingApplication", {
ApplicationName: "ExistingWebApp",
Description: "This application is being adopted from existing resources.",
adopt: true
});