Configure AWS on Zephyr
We now offer Amazon Web Services (AWS) as an option for Bring Your Own Cloud (BYOC) deployments. AWS is a top-tier cloud platform recognized for its flexibility, broad suite of tools, and extensive global infrastructure. It allows teams to develop and operate applications with strong reliability, robust security, and efficient performance.
Through this integration, you can make use of your current AWS setup to host and manage services within your own cloud environment — giving you enhanced oversight, adaptability, and support for all your needs.
In this guide, we’ll walk you through how to set up the integration and start running Zephyr on your own AWS infrastructure.
Prerequisites
- An AWS account with permission to create and update Zephyr-managed AWS resources
- A registered Zephyr account
- A registered domain
Configure and enable AWS
Log in to the Zephyr Dashboard
After signing in, select your organization.
Locate AWS under Deployment Integration
- Select Settings from the top navigation tabs.
- On the left sidebar, select Deployment Integration.
- Choose Available to find AWS, then click on Add integration.
Retrieve Credentials and Configure AWS
Before proceeding, you will need some data from AWS:
1. Credentials
- Go to IAM -> User groups in menu and click Create group button
- Type group name
- Choose Create policy
- Open the JSON editor
- Paste the policy below
- Attach that custom policy to the IAM group/user you use for Zephyr
- Click Create user group button
- Go to IAM -> Users in menu and click Create user button
- Type user name and click next button
- Choose Add user to group, choose your group and click next button
- Click Create user button
- Click on your user name
- Go to Security credentials tab
- Click Create access key button
- Choose Command Line Interface (CLI) and click Next button
- Click Create access key
- Download you credentials and add
[default]as a header, so token will look like:
Keep your credentials secure. Never commit credentials to version control or share them publicly.
This will be considered as your AWS API Token
2. Certificate arn
- Choose us-east-1 region
- Go to Certificate manager in menu and click Request button
- Choose Request a public certificate and click Next button
- Add
ze.yourdomain.comand*.ze.yourdomain.comas Fully qualified domain name and use defaults for the rest of inputs - Disable export, DNS validation - recommended, RSA 2048 - Validate with DNS CNAME
- Wait until domain becomes validated
- Copy
ARNvalue
Configuration Inputs
Back on Zephyr Dashboard, these are the details for each input after clicking Add Integration under AWS:
Obtainable from AWS. See instructions for creating your API token.
When set as default, all Zephyr deployments will use this integration until a new one (default integration) is set. Deployment using integration won't work until AWS worker and property become activated.
After completing the integration creation it can take up to 10 minutes to be complete.
Validate domain and setup DNS
- Go to Cloudfront -> Distributions
- Find you domain
- Copy value from
Domain name (standard)column and add DNS records described in the table below
What Will Be Created on Your AWS Account?
When AWS is added as your provider on Zephyr, these properties will be created on your AWS account:
1. IAM roles and policies
ze-yourdomain-com_lambda_edge_policy- lambda edge policyze-yourdomain-com_lambda_role_name- lambda role nameze-yourdomain-com-store-access-secrets- secret store policy
2. DynamoDB tables
ze-yourdomain-com_envsze-yourdomain-com_snapshots
3. Secret store
ze-yourdomain-com-store
4. S3 buckets
ze-yourdomain-com-bucket- more buckets will be created during work: one bucket per application
5. Labmda@Edge function
ze-yourdomain-com(for uploading and serving assets)
6. Cloudfront function
ze-yourdomain-com-viewer-request
7. Cloudfront
8. Cloudwatch log groups
/aws/lambda/us-east-1.ze-yourdomain-com/aws/lambda/ze-yourdomain-com
Clean Uninstall and Reset
- Zephyr Cloud does not manage deletion of API tokens or any AWS account properties.
- Assets and information on your AWS account are immutable by default. During a clean uninstall, previously deployed assets and information are unrecoverable.
To delete an existing AWS integration, follow these steps:
Ensure you have AWS cli installed and authenticated
Check AWS CLI documentation for more info
Ensure you have jq installed
Check jq documentation for more info
Remove DNS records related to your integration
See Validate domain and setup DNS.
Save the scripts below
Collect necessary data
Run the script for the first stage
DDB_TABLES="<envs_ddb_table> <snapshots_ddb_table>"
LOG_GROUPS="<global_log_group> <log_group>"
CF_DIST_ID=<cloudfront_distribution_id>
CF_FUNC_NAME=<cloudfront_function_name>
SECRET_NAME=<secret_store_name>
S3_BUCKET=<s3_bucket_name>
IAM_POLICY_SM_ARN="<secret_manager_arn>"
bash ./cleanup-stage1.sh
Run the script for the second stage
LAMBDA_NAME="<lambda_name>"
POLICY_ARN="<policy_arn>"
IAM_ROLE_ARN="<iam_role_arn>"
bash ./cleanup-stage2.sh