Skip to main content

apps

Creates, updates, deletes, gets or lists an apps resource.

Overview

Nameapps
TypeResource
Idaws.amplify.apps

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name for the Amplify app. (pattern: <code>(?s).+</code>)
app_arnstringThe Amazon Resource Name (ARN) of the Amplify app.
app_idstringThe unique ID of the Amplify app. (pattern: <code>d[a-z0-9]+</code>)
auto_branch_creation_configobjectDescribes the automated branch creation configuration.
auto_branch_creation_patternsarrayDescribes the automated branch creation glob patterns for the Amplify app.
basic_auth_credentialsstringThe basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password. (pattern: <code>(?s).*</code>)
build_specstringThe build specification (build spec) file for an Amplify app build. (pattern: <code>(?s).+</code>)
cache_configobjectDescribes the cache configuration for an Amplify app. For more information about how Amplify applies an optimal cache configuration for your app based on the type of content that is being served, see Managing cache configuration in the Amplify User guide.
compute_role_arnstringThe Amazon Resource Name (ARN) of the IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide. (pattern: <code>(?s).*</code>)
create_timestring (date-time)A timestamp of when Amplify created the application.
custom_headersstringDescribes the custom HTTP headers for the Amplify app. (pattern: <code>(?s).*</code>)
custom_rulesarrayDescribes the custom redirect and rewrite rules for the Amplify app.
default_domainstringThe default domain for the Amplify app.
descriptionstringThe description for the Amplify app. (pattern: <code>(?s).*</code>)
enable_auto_branch_creationbooleanEnables automated branch creation for the Amplify app.
enable_basic_authbooleanEnables basic authorization for the Amplify app's branches.
enable_branch_auto_buildbooleanEnables the auto-building of branches for the Amplify app.
enable_branch_auto_deletionbooleanAutomatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.
environment_variablesobjectThe environment variables for the Amplify app. For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide.
iam_service_role_arnstringThe Amazon Resource Name (ARN) of the IAM service role for the Amplify app. (pattern: <code>(?s).*</code>)
job_configobjectDescribes the configuration details that apply to the jobs for an Amplify app. Use JobConfig to apply configuration to jobs, such as customizing the build instance size when you create or update an Amplify app. For more information about customizable build instances, see Custom build instances in the Amplify User Guide.
platformstringThe platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. If you are deploying an SSG only app with Next.js 14 or later, you must use the platform type WEB_COMPUTE. (WEB, WEB_DYNAMIC, WEB_COMPUTE)
production_branchobjectDescribes the information about a production branch of the Amplify app.
repositorystringThe Git repository for the Amplify app. (pattern: <code>(?s).*</code>)
repository_clone_methodstringThis is for internal use. The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories. (SSH, TOKEN, SIGV4)
tagsobjectThe tag for the Amplify app.
update_timestring (date-time)A timestamp of when Amplify updated the application.
waf_configurationobjectDescribes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.
webhook_create_timestring (date-time)A timestamp of when Amplify created the webhook in your Git repository.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_appselectapp_id, regionReturns an existing Amplify app specified by an app ID.
list_appsselectregionnextToken, maxResultsReturns a list of the existing Amplify apps.
create_appinsertregion, nameCreates a new Amplify app.
update_appupdateapp_id, regionUpdates an existing Amplify app.
delete_appdeleteapp_id, regionDeletes an existing Amplify app specified by an app ID.
generate_access_logsexecapp_id, region, domainNameReturns the website access logs for a specific time range using a presigned URL.

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 for an Amplify app.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of records to list in a single response.
nextTokenstringA pagination token. If non-null, the pagination token is returned in a result. Pass its value in another request to retrieve more entries.

SELECT examples

Returns an existing Amplify app specified by an app ID.

SELECT
name,
app_arn,
app_id,
auto_branch_creation_config,
auto_branch_creation_patterns,
basic_auth_credentials,
build_spec,
cache_config,
compute_role_arn,
create_time,
custom_headers,
custom_rules,
default_domain,
description,
enable_auto_branch_creation,
enable_basic_auth,
enable_branch_auto_build,
enable_branch_auto_deletion,
environment_variables,
iam_service_role_arn,
job_config,
platform,
production_branch,
repository,
repository_clone_method,
tags,
update_time,
waf_configuration,
webhook_create_time
FROM aws.amplify.apps
WHERE app_id = '{{ app_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new Amplify app.

INSERT INTO aws.amplify.apps (
name,
description,
repository,
platform,
computeRoleArn,
iamServiceRoleArn,
oauthToken,
accessToken,
environmentVariables,
enableBranchAutoBuild,
enableBranchAutoDeletion,
enableBasicAuth,
basicAuthCredentials,
customRules,
tags,
buildSpec,
customHeaders,
enableAutoBranchCreation,
autoBranchCreationPatterns,
autoBranchCreationConfig,
jobConfig,
cacheConfig,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ repository }}',
'{{ platform }}',
'{{ computeRoleArn }}',
'{{ iamServiceRoleArn }}',
'{{ oauthToken }}',
'{{ accessToken }}',
'{{ environmentVariables }}',
{{ enableBranchAutoBuild }},
{{ enableBranchAutoDeletion }},
{{ enableBasicAuth }},
'{{ basicAuthCredentials }}',
'{{ customRules }}',
'{{ tags }}',
'{{ buildSpec }}',
'{{ customHeaders }}',
{{ enableAutoBranchCreation }},
'{{ autoBranchCreationPatterns }}',
'{{ autoBranchCreationConfig }}',
'{{ jobConfig }}',
'{{ cacheConfig }}',
'{{ region }}'
RETURNING
app
;

UPDATE examples

Updates an existing Amplify app.

UPDATE aws.amplify.apps
SET
name = '{{ name }}',
description = '{{ description }}',
platform = '{{ platform }}',
computeRoleArn = '{{ computeRoleArn }}',
iamServiceRoleArn = '{{ iamServiceRoleArn }}',
environmentVariables = '{{ environmentVariables }}',
enableBranchAutoBuild = {{ enableBranchAutoBuild }},
enableBranchAutoDeletion = {{ enableBranchAutoDeletion }},
enableBasicAuth = {{ enableBasicAuth }},
basicAuthCredentials = '{{ basicAuthCredentials }}',
customRules = '{{ customRules }}',
buildSpec = '{{ buildSpec }}',
customHeaders = '{{ customHeaders }}',
enableAutoBranchCreation = {{ enableAutoBranchCreation }},
autoBranchCreationPatterns = '{{ autoBranchCreationPatterns }}',
autoBranchCreationConfig = '{{ autoBranchCreationConfig }}',
repository = '{{ repository }}',
oauthToken = '{{ oauthToken }}',
accessToken = '{{ accessToken }}',
jobConfig = '{{ jobConfig }}',
cacheConfig = '{{ cacheConfig }}'
WHERE
app_id = '{{ app_id }}' --required
AND region = '{{ region }}' --required
RETURNING
app;

DELETE examples

Deletes an existing Amplify app specified by an app ID.

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

Lifecycle Methods

Returns the website access logs for a specific time range using a presigned URL.

EXEC aws.amplify.apps.generate_access_logs
@app_id='{{ app_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"startTime": "{{ startTime }}",
"endTime": "{{ endTime }}",
"domainName": "{{ domainName }}"
}'
;