Skip to main content

backend_environments

Creates, updates, deletes, gets or lists a backend_environments resource.

Overview

Namebackend_environments
TypeResource
Idaws.amplify.backend_environments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
backend_environment_arnstringThe Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app. (pattern: <code>(?s).*</code>)
create_timestring (date-time)The creation date and time for a backend environment that is part of an Amplify app.
deployment_artifactsstringThe name of deployment artifacts. (pattern: <code>(?s).+</code>)
environment_namestringThe name for a backend environment that is part of an Amplify app. (pattern: <code>(?s).+</code>)
stack_namestringThe AWS CloudFormation stack name of a backend environment. (pattern: <code>(?s).+</code>)
update_timestring (date-time)The last updated date and time for a backend environment that is part of an Amplify app.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_backend_environmentselectapp_id, environment_name, regionReturns a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
list_backend_environmentsselectapp_id, regionenvironmentName, nextToken, maxResultsLists the backend environments for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
create_backend_environmentinsertapp_id, region, environmentNameCreates a new backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
delete_backend_environmentdeleteapp_id, environment_name, regionDeletes a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
app_idstringThe unique ID of an Amplify app.
environment_namestringThe name of a backend environment of an Amplify app.
regionstringAWS region (default: us-east-1)
environmentNamestringThe name of the backend environment
maxResultsintegerThe maximum number of records to list in a single response.
nextTokenstringA pagination token. Set to null to start listing backend environments from the start. If a non-null pagination token is returned in a result, pass its value in here to list more backend environments.

SELECT examples

Returns a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

SELECT
backend_environment_arn,
create_time,
deployment_artifacts,
environment_name,
stack_name,
update_time
FROM aws.amplify.backend_environments
WHERE app_id = '{{ app_id }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

INSERT INTO aws.amplify.backend_environments (
environmentName,
stackName,
deploymentArtifacts,
app_id,
region
)
SELECT
'{{ environmentName }}' /* required */,
'{{ stackName }}',
'{{ deploymentArtifacts }}',
'{{ app_id }}',
'{{ region }}'
RETURNING
backend_environment
;

DELETE examples

Deletes a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

DELETE FROM aws.amplify.backend_environments
WHERE app_id = '{{ app_id }}' --required
AND environment_name = '{{ environment_name }}' --required
AND region = '{{ region }}' --required
;