Skip to main content

domains

Creates, updates, deletes or gets a domain resource or lists domains in a region

Overview

Namedomains
TypeResource
DescriptionThe AWS::Amplify::Domain resource allows you to connect a custom domain to your app.
Idaws.amplify.domains

Fields

NameDatatypeDescription
app_idstring
arnstring
auto_sub_domain_creation_patternsarray
auto_sub_domain_iam_rolestring
certificate_recordstring
certificateobject
certificate_settingsobject
domain_namestring
domain_statusstring
update_statusstring
enable_auto_sub_domainboolean
status_reasonstring
sub_domain_settingsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAppId, DomainName, SubDomainSettings, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all domains in a region.

SELECT
region,
app_id,
arn,
auto_sub_domain_creation_patterns,
auto_sub_domain_iam_role,
certificate_record,
certificate,
certificate_settings,
domain_name,
domain_status,
update_status,
enable_auto_sub_domain,
status_reason,
sub_domain_settings
FROM aws.amplify.domains
WHERE region = 'us-east-1';

Gets all properties from an individual domain.

SELECT
region,
app_id,
arn,
auto_sub_domain_creation_patterns,
auto_sub_domain_iam_role,
certificate_record,
certificate,
certificate_settings,
domain_name,
domain_status,
update_status,
enable_auto_sub_domain,
status_reason,
sub_domain_settings
FROM aws.amplify.domains
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new domain resource, using stack-deploy.

/*+ create */
INSERT INTO aws.amplify.domains (
AppId,
DomainName,
SubDomainSettings,
region
)
SELECT
'{{ AppId }}',
'{{ DomainName }}',
'{{ SubDomainSettings }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.amplify.domains
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the domains resource, the following permissions are required:

Create

amplify:CreateDomainAssociation,
route53:ListHostedZones,
route53:ChangeResourceRecordSets,
iam:PassRole,
amplify:TagResource

Delete

amplify:DeleteDomainAssociation,
iam:PassRole,
amplify:DeleteDomainAssociation

List

amplify:ListDomainAssociations,
iam:PassRole,
amplify:ListTagsForResource

Read

amplify:GetDomainAssociation,
route53:ListHostedZones,
iam:PassRole,
amplify:ListTagsForResource

Update

amplify:UpdateDomainAssociation,
route53:ListHostedZones,
route53:ChangeResourceRecordSets,
iam:PassRole,
amplify:ListTagsForResource,
amplify:TagResource,
amplify:UntagResource