If you prefer to use the Linux command wget instead, you could add code similar to the following to the User data field, which defines the variable REGION as an instance's Availability Zone, and then calls the variable to retrieve the CodeDeploy agent installation files from the geographically-closest Amazon S3 bucket: