in amplify/backend/function/awssyncroutes/src/app.js [41:64]
async function getRouteTableDescriptions(vpcId) {
const params = {
DryRun: false,
Filters: [
{
Name: 'vpc-id',
Values: [vpcId], // Only evaluate route tables in the specified VPC
},
],
};
const routeTableDescriptions = await ec2.describeRouteTables(params).promise()
.catch((err) => {
const params = {
Subject: `FAILED: Describe route tables in VPC: '${vpcId}'`,
Message: err.message,
TopicArn: process.env.SNS_TOPIC_ARN
};
sns.publish(params);
});
return routeTableDescriptions;
}