Skip to content
GitHubXDiscordRSS

Service

Learn how to create, update, and manage AWS VpcLattice Services using Alchemy Cloud Control.

The Service resource lets you manage AWS VpcLattice Services and their associated settings.

Create a basic VpcLattice Service with required properties and a custom domain name.

import AWS from "alchemy/aws/control";
const basicService = await AWS.VpcLattice.Service("basicVpcService", {
name: "BasicService",
customDomainName: "service.example.com",
dnsEntry: {
hostname: "service.example.com",
zoneId: "Z1RANDOMZONEID"
}
});

Configure a service with additional settings such as authentication type and SSL certificate.

const advancedService = await AWS.VpcLattice.Service("advancedVpcService", {
name: "AdvancedService",
customDomainName: "advanced.example.com",
authType: "AWS_IAM",
certificateArn: "arn:aws:acm:us-east-1:123456789012:certificate/abcd1234-5678-90ef-ghij-klmnopqrstuv",
tags: [
{ key: "Environment", value: "Production" },
{ key: "Project", value: "VpcLatticeDemo" }
]
});

Create a service that includes specific tags for better resource management.

const taggedService = await AWS.VpcLattice.Service("taggedVpcService", {
name: "TaggedService",
customDomainName: "tagged.example.com",
tags: [
{ key: "Owner", value: "DevTeam" },
{ key: "Purpose", value: "API Gateway" }
]
});

Create a service while adopting an existing resource if it already exists.

const adoptedService = await AWS.VpcLattice.Service("adoptedVpcService", {
name: "AdoptedService",
customDomainName: "adopted.example.com",
adopt: true
});