AWS ENVIRONMENT Apono Connector for AWS Updating a connector in AWS Learn how to update a connector through the AWS CLI
Periodically, you may need to update your AWS connector to help maintain functionality, performance, and security.
This article explains how to update a connector through the AWS CLI and redeploy the CloudFormation stack with the latest connector template.
Prerequisites
In AWS CloudFormation, name of a collection of AWS resources managed as a single unit
Use the following steps to retrieve the stack name:
Under the Stack name column, copy the stack name.
AWS Command Line Interface (AWS CLI)
Update a connector
Follow these steps to update a connector:
Copy the following Account level or Organization level AWS update script. Be sure to replace AWS_STACK_NAME
with your AWS stack name.
Account Level Organizational Level
Copy aws cloudformation update-stack --stack-name AWS_STACK_NAME \
--template-url https://apono-public.s3.amazonaws.com/cloudformation/aws_integration_with_connector_template.yml \
--parameters ParameterKey=AponoConnectorId,UsePreviousValue=true \
ParameterKey=AponoConnectorToken,UsePreviousValue=true \
ParameterKey=ExternalID,UsePreviousValue=true \
ParameterKey=SubnetIDs,UsePreviousValue=true \
ParameterKey=VpcId,UsePreviousValue=true \
--capabilities CAPABILITY_NAMED_IAM
Copy aws cloudformation update-stack --stack-name AWS_STACK_NAME --template-url https://apono-public-dev.s3.amazonaws.com/cloudformation/aws_organization_integration_template.yml \
--parameters ParameterKey=AponoConnectorId,UsePreviousValue=true \
ParameterKey=AponoConnectorToken,UsePreviousValue=true \
ParameterKey=AssignPublicIp,UsePreviousValue=true \
ParameterKey=ExternalID,UsePreviousValue=true \
ParameterKey=OrganizationalUnitId,UsePreviousValue=true \
ParameterKey=SubnetIDs,UsePreviousValue=true \
ParameterKey=VpcId,UsePreviousValue=true \
--capabilities CAPABILITY_NAMED_IAM
export stackSetName=$(
aws cloudformation describe-stack-resources \
--stack-name AWS_STACK_NAME \
--logical-resource-id CrossAccountReadOnlyRoleStackSetResource \
--query "StackResources[0].PhysicalResourceId" \
--output text)
aws cloudformation update-stack-set --stack-set-name $stackSetName --template-url https://apono-public.s3.amazonaws.com/cloudformation/aws_integration_read_only_template.yml \
--parameters ParameterKey=ExternalID,UsePreviousValue=true \
ParameterKey=AponoConnectorId,UsePreviousValue=true \
ParameterKey=AponoConnectorRoleArn,UsePreviousValue=true \
--capabilities CAPABILITY_NAMED_IAM
At your AWS CLI prompt, enter the updated script from the previous step to initiate the update. The AWS CLI will return an object containing the StackId
.
In CloudFormation, on the Stack Info tab, confirm that the update has completed:
Under the Stack name column, click the stack name.
On the Stack info tab, check the Status .
Troubleshooting
This section details common errors that can occur during the updating process. If an error occurs that is not listed below, please contact your Apono representative.
An error occurred (ValidationError) when calling the UpdateStack operation: Stack [stack name] does not exist. This occurs when the incorrect stack name has been included in the update script.
Use the following steps to correct this error:
Last updated 6 months ago