This strategy relies on the InstanceUserData
parameter in the Managed Services Create EC2 CT. For more information on using this parameter,
see Configuring Instances with User Data.
This example assumes a pull-based application deployment tool like Chef or Puppet.
IDs for all CT options can be found in the Change Type Reference.
Note
Currently, you must use Amazon S3 storage with this solution.
The basic steps are outlined here and the procedure is detailed in the AMS User Guide.
Create an Amazon S3 storage bucket. CT: ct-1a68ck03fn98r. The S3 bucket must have versioning enabled (for information on doing this, see Enabling Bucket Versioning).
Put your bundled CodeDeploy artifacts on it. You can do this with the Amazon S3 console without requesting access through AMS. Or using a variation of this command:
aws s3 cp
ZIP_FILEPATH_AND_NAME
s3://S3BUCKET_NAME
/Find an AMS AMI, all will have CodeDeploy on them. To find a "customer-" AMI use either:
AMS Console: The VPC details page for the relevant VPC
AMS API For the AMS SKMS API reference, see the Reports tab in the AWS Artifact Console. or CLI:
aws amsskms list-amis
Create an EC2 instance. CT: ct-14027q0sjyt1h; set a tag
Key=backup, Value=true
, and use theInstanceUserData
parameter to run a bootstrap and other scripts including authorization keys, SALT stack (bootstrap a minion—for more information see Bootstrapping Salt on Linux EC2 with Cloud-Init) or Ansible (install a key pair—for more information see Getting Started with Ansible and Dynamic Amazon EC2 Inventory Management ). Alternately, request access to, and log in to, the instance and configure it with the necessary deployment artifacts. Remember that push-based commands come from your corporate subnet to your instances and you may need to configure authorization for them to go thru bastions. You may need a service request to AMS to request security group/AD group access without bastions. Repeat step 4 to create another EC2 instance and configure it with the deployment tool master server.
When you need to update your application, use the deployment tool to rollout the updates to your instances.