1. Packages
  2. AWS
  3. API Docs
  4. amplify
  5. BackendEnvironment
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.amplify.BackendEnvironment

Explore with Pulumi AI

Provides an Amplify Backend Environment resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.amplify.App("example", {name: "example"});
const exampleBackendEnvironment = new aws.amplify.BackendEnvironment("example", {
    appId: example.id,
    environmentName: "example",
    deploymentArtifacts: "app-example-deployment",
    stackName: "amplify-app-example",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.amplify.App("example", name="example")
example_backend_environment = aws.amplify.BackendEnvironment("example",
    app_id=example.id,
    environment_name="example",
    deployment_artifacts="app-example-deployment",
    stack_name="amplify-app-example")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := amplify.NewApp(ctx, "example", &amplify.AppArgs{
			Name: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		_, err = amplify.NewBackendEnvironment(ctx, "example", &amplify.BackendEnvironmentArgs{
			AppId:               example.ID(),
			EnvironmentName:     pulumi.String("example"),
			DeploymentArtifacts: pulumi.String("app-example-deployment"),
			StackName:           pulumi.String("amplify-app-example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Amplify.App("example", new()
    {
        Name = "example",
    });

    var exampleBackendEnvironment = new Aws.Amplify.BackendEnvironment("example", new()
    {
        AppId = example.Id,
        EnvironmentName = "example",
        DeploymentArtifacts = "app-example-deployment",
        StackName = "amplify-app-example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.amplify.App;
import com.pulumi.aws.amplify.AppArgs;
import com.pulumi.aws.amplify.BackendEnvironment;
import com.pulumi.aws.amplify.BackendEnvironmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new App("example", AppArgs.builder()
            .name("example")
            .build());

        var exampleBackendEnvironment = new BackendEnvironment("exampleBackendEnvironment", BackendEnvironmentArgs.builder()
            .appId(example.id())
            .environmentName("example")
            .deploymentArtifacts("app-example-deployment")
            .stackName("amplify-app-example")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:amplify:App
    properties:
      name: example
  exampleBackendEnvironment:
    type: aws:amplify:BackendEnvironment
    name: example
    properties:
      appId: ${example.id}
      environmentName: example
      deploymentArtifacts: app-example-deployment
      stackName: amplify-app-example
Copy

Create BackendEnvironment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new BackendEnvironment(name: string, args: BackendEnvironmentArgs, opts?: CustomResourceOptions);
@overload
def BackendEnvironment(resource_name: str,
                       args: BackendEnvironmentArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def BackendEnvironment(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       app_id: Optional[str] = None,
                       environment_name: Optional[str] = None,
                       deployment_artifacts: Optional[str] = None,
                       stack_name: Optional[str] = None)
func NewBackendEnvironment(ctx *Context, name string, args BackendEnvironmentArgs, opts ...ResourceOption) (*BackendEnvironment, error)
public BackendEnvironment(string name, BackendEnvironmentArgs args, CustomResourceOptions? opts = null)
public BackendEnvironment(String name, BackendEnvironmentArgs args)
public BackendEnvironment(String name, BackendEnvironmentArgs args, CustomResourceOptions options)
type: aws:amplify:BackendEnvironment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BackendEnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BackendEnvironmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BackendEnvironmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BackendEnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BackendEnvironmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var backendEnvironmentResource = new Aws.Amplify.BackendEnvironment("backendEnvironmentResource", new()
{
    AppId = "string",
    EnvironmentName = "string",
    DeploymentArtifacts = "string",
    StackName = "string",
});
Copy
example, err := amplify.NewBackendEnvironment(ctx, "backendEnvironmentResource", &amplify.BackendEnvironmentArgs{
	AppId:               pulumi.String("string"),
	EnvironmentName:     pulumi.String("string"),
	DeploymentArtifacts: pulumi.String("string"),
	StackName:           pulumi.String("string"),
})
Copy
var backendEnvironmentResource = new BackendEnvironment("backendEnvironmentResource", BackendEnvironmentArgs.builder()
    .appId("string")
    .environmentName("string")
    .deploymentArtifacts("string")
    .stackName("string")
    .build());
Copy
backend_environment_resource = aws.amplify.BackendEnvironment("backendEnvironmentResource",
    app_id="string",
    environment_name="string",
    deployment_artifacts="string",
    stack_name="string")
Copy
const backendEnvironmentResource = new aws.amplify.BackendEnvironment("backendEnvironmentResource", {
    appId: "string",
    environmentName: "string",
    deploymentArtifacts: "string",
    stackName: "string",
});
Copy
type: aws:amplify:BackendEnvironment
properties:
    appId: string
    deploymentArtifacts: string
    environmentName: string
    stackName: string
Copy

BackendEnvironment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BackendEnvironment resource accepts the following input properties:

AppId
This property is required.
Changes to this property will trigger replacement.
string
Unique ID for an Amplify app.
EnvironmentName
This property is required.
Changes to this property will trigger replacement.
string
Name for the backend environment.
DeploymentArtifacts Changes to this property will trigger replacement. string
Name of deployment artifacts.
StackName Changes to this property will trigger replacement. string
AWS CloudFormation stack name of a backend environment.
AppId
This property is required.
Changes to this property will trigger replacement.
string
Unique ID for an Amplify app.
EnvironmentName
This property is required.
Changes to this property will trigger replacement.
string
Name for the backend environment.
DeploymentArtifacts Changes to this property will trigger replacement. string
Name of deployment artifacts.
StackName Changes to this property will trigger replacement. string
AWS CloudFormation stack name of a backend environment.
appId
This property is required.
Changes to this property will trigger replacement.
String
Unique ID for an Amplify app.
environmentName
This property is required.
Changes to this property will trigger replacement.
String
Name for the backend environment.
deploymentArtifacts Changes to this property will trigger replacement. String
Name of deployment artifacts.
stackName Changes to this property will trigger replacement. String
AWS CloudFormation stack name of a backend environment.
appId
This property is required.
Changes to this property will trigger replacement.
string
Unique ID for an Amplify app.
environmentName
This property is required.
Changes to this property will trigger replacement.
string
Name for the backend environment.
deploymentArtifacts Changes to this property will trigger replacement. string
Name of deployment artifacts.
stackName Changes to this property will trigger replacement. string
AWS CloudFormation stack name of a backend environment.
app_id
This property is required.
Changes to this property will trigger replacement.
str
Unique ID for an Amplify app.
environment_name
This property is required.
Changes to this property will trigger replacement.
str
Name for the backend environment.
deployment_artifacts Changes to this property will trigger replacement. str
Name of deployment artifacts.
stack_name Changes to this property will trigger replacement. str
AWS CloudFormation stack name of a backend environment.
appId
This property is required.
Changes to this property will trigger replacement.
String
Unique ID for an Amplify app.
environmentName
This property is required.
Changes to this property will trigger replacement.
String
Name for the backend environment.
deploymentArtifacts Changes to this property will trigger replacement. String
Name of deployment artifacts.
stackName Changes to this property will trigger replacement. String
AWS CloudFormation stack name of a backend environment.

Outputs

All input properties are implicitly available as output properties. Additionally, the BackendEnvironment resource produces the following output properties:

Arn string
ARN for a backend environment that is part of an Amplify app.
Id string
The provider-assigned unique ID for this managed resource.
Arn string
ARN for a backend environment that is part of an Amplify app.
Id string
The provider-assigned unique ID for this managed resource.
arn String
ARN for a backend environment that is part of an Amplify app.
id String
The provider-assigned unique ID for this managed resource.
arn string
ARN for a backend environment that is part of an Amplify app.
id string
The provider-assigned unique ID for this managed resource.
arn str
ARN for a backend environment that is part of an Amplify app.
id str
The provider-assigned unique ID for this managed resource.
arn String
ARN for a backend environment that is part of an Amplify app.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing BackendEnvironment Resource

Get an existing BackendEnvironment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BackendEnvironmentState, opts?: CustomResourceOptions): BackendEnvironment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_id: Optional[str] = None,
        arn: Optional[str] = None,
        deployment_artifacts: Optional[str] = None,
        environment_name: Optional[str] = None,
        stack_name: Optional[str] = None) -> BackendEnvironment
func GetBackendEnvironment(ctx *Context, name string, id IDInput, state *BackendEnvironmentState, opts ...ResourceOption) (*BackendEnvironment, error)
public static BackendEnvironment Get(string name, Input<string> id, BackendEnvironmentState? state, CustomResourceOptions? opts = null)
public static BackendEnvironment get(String name, Output<String> id, BackendEnvironmentState state, CustomResourceOptions options)
resources:  _:    type: aws:amplify:BackendEnvironment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AppId Changes to this property will trigger replacement. string
Unique ID for an Amplify app.
Arn string
ARN for a backend environment that is part of an Amplify app.
DeploymentArtifacts Changes to this property will trigger replacement. string
Name of deployment artifacts.
EnvironmentName Changes to this property will trigger replacement. string
Name for the backend environment.
StackName Changes to this property will trigger replacement. string
AWS CloudFormation stack name of a backend environment.
AppId Changes to this property will trigger replacement. string
Unique ID for an Amplify app.
Arn string
ARN for a backend environment that is part of an Amplify app.
DeploymentArtifacts Changes to this property will trigger replacement. string
Name of deployment artifacts.
EnvironmentName Changes to this property will trigger replacement. string
Name for the backend environment.
StackName Changes to this property will trigger replacement. string
AWS CloudFormation stack name of a backend environment.
appId Changes to this property will trigger replacement. String
Unique ID for an Amplify app.
arn String
ARN for a backend environment that is part of an Amplify app.
deploymentArtifacts Changes to this property will trigger replacement. String
Name of deployment artifacts.
environmentName Changes to this property will trigger replacement. String
Name for the backend environment.
stackName Changes to this property will trigger replacement. String
AWS CloudFormation stack name of a backend environment.
appId Changes to this property will trigger replacement. string
Unique ID for an Amplify app.
arn string
ARN for a backend environment that is part of an Amplify app.
deploymentArtifacts Changes to this property will trigger replacement. string
Name of deployment artifacts.
environmentName Changes to this property will trigger replacement. string
Name for the backend environment.
stackName Changes to this property will trigger replacement. string
AWS CloudFormation stack name of a backend environment.
app_id Changes to this property will trigger replacement. str
Unique ID for an Amplify app.
arn str
ARN for a backend environment that is part of an Amplify app.
deployment_artifacts Changes to this property will trigger replacement. str
Name of deployment artifacts.
environment_name Changes to this property will trigger replacement. str
Name for the backend environment.
stack_name Changes to this property will trigger replacement. str
AWS CloudFormation stack name of a backend environment.
appId Changes to this property will trigger replacement. String
Unique ID for an Amplify app.
arn String
ARN for a backend environment that is part of an Amplify app.
deploymentArtifacts Changes to this property will trigger replacement. String
Name of deployment artifacts.
environmentName Changes to this property will trigger replacement. String
Name for the backend environment.
stackName Changes to this property will trigger replacement. String
AWS CloudFormation stack name of a backend environment.

Import

Using pulumi import, import Amplify backend environment using app_id and environment_name. For example:

$ pulumi import aws:amplify/backendEnvironment:BackendEnvironment example d2ypk4k47z8u6/example
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.