Connecting AWS
Link your Amazon Web Services account to Zynnode using a CloudFormation stack so Zynnode can deploy AWS resources on your behalf.
Zynnode connects to AWS by asking AWS CloudFormation to create the resources Zynnode needs in your AWS account. You do not need to run terminal commands or create long-lived AWS access keys.
The setup flow opens a CloudFormation stack in AWS. You review the stack, acknowledge that it creates IAM resources, create it, and wait for the stack to finish. When the stack completes, a callback Lambda notifies Zynnode so the AWS connection can be saved.
What the AWS connection creates
The CloudFormation template creates these resources:
| Resource | What it does |
|---|---|
ProodcuIntegrationRole | IAM role Zynnode assumes to deploy resources into your AWS account. |
CallbackLambdaRole | IAM role used by the callback Lambda. |
CallbackLambda | Lambda function that notifies Zynnode after the role is created. |
TriggerCallback | CloudFormation custom resource that runs the callback. |
The stack must be created by an AWS user or role that can create IAM roles and Lambda functions.
Before you start
Make sure you are signed in to the correct AWS account before creating the stack. If the wrong account is selected in the AWS console, the connection may be created in the wrong account or the stack may fail because you have different permissions there.
The AWS user or role creating the stack needs permission to:
- create and manage the CloudFormation stack
- create IAM roles
- attach inline policies to IAM roles
- tag IAM roles
- pass an IAM role to Lambda
- create and invoke the callback Lambda function
- create CloudWatch log groups and streams for the Lambda
If you are not an AWS admin, ask your AWS account admin to either run the CloudFormation stack for you or grant the required permissions before you start.
Recommended setup option
The simplest option is for an AWS administrator to run the CloudFormation stack from the Zynnode connection flow.
Use this option when:
- you are not comfortable changing IAM permissions
- the AWS account is managed by a company or client
- you received a permission error while creating the stack
- your organization requires admins to approve new IAM roles
The AWS admin should sign in, open the Zynnode connection flow, review the stack, acknowledge IAM resource creation, and create the stack.
Minimum permissions for the stack creator
If an AWS admin wants to grant a scoped policy instead of using full administrator access, the stack creator needs permissions like these.
Replace 123456789012 with your real AWS account ID.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowZynnodeCloudFormationStackManagement",
"Effect": "Allow",
"Action": [
"cloudformation:CreateStack",
"cloudformation:DescribeStacks",
"cloudformation:DescribeStackEvents",
"cloudformation:DeleteStack"
],
"Resource": "*"
},
{
"Sid": "AllowZynnodeIamRoleSetup",
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:GetRole",
"iam:DeleteRole",
"iam:PutRolePolicy",
"iam:DeleteRolePolicy",
"iam:PassRole",
"iam:TagRole",
"iam:UntagRole"
],
"Resource": "arn:aws:iam::123456789012:role/*"
},
{
"Sid": "AllowZynnodeCallbackLambdaSetup",
"Effect": "Allow",
"Action": [
"lambda:CreateFunction",
"lambda:GetFunction",
"lambda:DeleteFunction",
"lambda:InvokeFunction"
],
"Resource": "*"
},
{
"Sid": "AllowZynnodeCallbackLambdaLogs",
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "*"
}
]
}IAM role permissions must apply to role/*, not only user/*. The Zynnode stack creates IAM roles.
This is wrong for the Zynnode CloudFormation stack:
"Resource": "arn:aws:iam::123456789012:user/*"Use role resources instead:
"Resource": "arn:aws:iam::123456789012:role/*"Step-by-step setup
Open the AWS connection flow in Zynnode
- Sign in to Zynnode.
- Go to the dashboard.
- Open the cloud connections or integrations area.
- Click Connect AWS.
Zynnode generates a CloudFormation template for the current user. The template includes a unique external ID so Zynnode can securely assume the created AWS role.
Open the CloudFormation stack in AWS
After clicking Connect AWS, you should be taken to AWS CloudFormation or shown a CloudFormation template that can be uploaded in AWS.
If AWS asks you to sign in, sign in with the AWS account that will host your deployments.
Review the stack details
On the CloudFormation stack creation page:
- Confirm the AWS region is correct.
- Confirm the stack name is recognizable, for example
zynnode-stacking. - Review the template source.
- Continue to the stack options page if AWS shows a multi-step wizard.
The stack name becomes part of some created resource names. For example, a stack named zynnode-stacking may create a role named:
ProodcuIntegrationRole-zynnode-stackingAWS may also add a generated suffix to some resource names, such as:
zynnode-stacking-CallbackLambdaRole-GMiCR3VIqiwyReview the resources CloudFormation will create
Before creating the stack, review the resources AWS shows in the template summary. You should expect IAM and Lambda resources.
Expected resources include:
- an IAM integration role for Zynnode
- an IAM callback Lambda role
- a Lambda callback function
- a custom resource that triggers the callback
This is expected. Zynnode needs the integration role so it can deploy AWS resources on your behalf.
Acknowledge IAM resource creation
At the bottom of the CloudFormation stack creation page, AWS shows a checkbox similar to:
I acknowledge that AWS CloudFormation might create IAM resources.You must check this box. If you do not, AWS will not create the stack.
Create the stack
Click Create stack.
AWS will begin creating the resources. The stack status will move through states such as:
CREATE_IN_PROGRESSCREATE_COMPLETE
You can open the Events tab to watch progress.
Wait for CREATE_COMPLETE
Wait until the stack status is:
CREATE_COMPLETEWhen the stack completes, the callback Lambda notifies Zynnode with the created role ARN and external ID. Zynnode then stores the AWS connection.
Confirm the connection in Zynnode
Return to Zynnode and refresh the cloud connections page if needed.
The AWS connection should appear as active. After that, you can choose AWS as a deployment target in Zynnode.
Troubleshooting
iam:CreateRole permission error
If CloudFormation fails with an error like this:
User: arn:aws:iam::123456789012:user/CodingPastor is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::123456789012:role/zynnode-stacking-CallbackLambdaRole-GMiCR3VIqiwy because no identity-based policy allows the iam:CreateRole actionThe root issue is:
The AWS user creating the stack does not have permission to create IAM roles.AWS may show this as a tagging error:
Encountered a permissions error performing a tagging operation, please add required tag permissions.
HandlerErrorCode: UnauthorizedTaggingOperationThat message can be confusing. In the detailed error, the real denied action may still be:
iam:CreateRoleTo fix it, ask the AWS admin to grant the stack creator role permissions on IAM roles, especially:
iam:CreateRoleiam:PutRolePolicyiam:PassRoleiam:TagRoleiam:UntagRoleiam:GetRoleiam:DeleteRoleiam:DeleteRolePolicy
The policy must allow role resources:
"Resource": "arn:aws:iam::123456789012:role/*"It is not enough to allow only user resources:
"Resource": "arn:aws:iam::123456789012:user/*"Policy allows iam:* but the stack still fails
If the AWS admin says they already granted iam:*, check the policy resource.
This policy does not allow creating roles:
{
"Effect": "Allow",
"Action": "iam:*",
"Resource": "arn:aws:iam::123456789012:user/*"
}It only allows IAM actions on IAM users. Zynnode needs IAM role permissions.
Use this instead:
{
"Effect": "Allow",
"Action": "iam:*",
"Resource": "arn:aws:iam::123456789012:role/*"
}For a more restricted policy, use the minimum permissions listed earlier in this guide.
Role cannot be found during rollback
After a failed stack creation, AWS may show messages like:
The role with name ProodcuIntegrationRole-zynnode-stacking cannot be found.
The role with name zynnode-stacking-CallbackLambdaRole-GMiCR3VIqiwy cannot be found.These messages usually happen during rollback. They are cleanup messages, not the root cause.
The important event is the first CREATE_FAILED event. In the permissions case, that event usually says the user is not authorized to perform iam:CreateRole.
What to do:
- Wait for the stack rollback to finish.
- Ask the AWS admin to fix the IAM permissions.
- Delete the failed stack if AWS leaves it in the CloudFormation console.
- Start the Zynnode AWS connection flow again.
Stack is stuck in rollback
If the stack is in ROLLBACK_IN_PROGRESS, wait for AWS to finish. Do not retry while rollback is still running.
When rollback finishes, the stack may show:
ROLLBACK_COMPLETEDELETE_COMPLETE- a failed stack that can be manually deleted
After rollback finishes, fix the permission issue and create a new stack from Zynnode.
Callback does not complete
If the CloudFormation stack reaches CREATE_COMPLETE but Zynnode does not show the AWS connection:
- Open the CloudFormation stack.
- Check the stack outputs for the role ARN.
- Open the Lambda function created by the stack.
- Check the Lambda logs in CloudWatch.
- Confirm the Lambda can reach the Zynnode callback URL.
The callback URL is generated from the Zynnode backend base URL. If Zynnode is running in a private or temporary environment, the callback URL must be publicly reachable by AWS Lambda.
I want to disconnect AWS
To remove the Zynnode connection from your AWS account:
- Open the AWS CloudFormation Console.
- Find the Zynnode stack.
- Select it and click Delete.
- In the Zynnode dashboard, remove the AWS connection card.
Message to send to an AWS admin
Use this when asking an AWS admin for help:
We are connecting Zynnode to our AWS account using a CloudFormation stack.
The stack creates IAM roles and a callback Lambda. It failed because my AWS user does not have permission to create IAM roles.
Please either run the CloudFormation stack with an admin AWS role, or grant my AWS user/role permission to create and manage IAM roles under arn:aws:iam::<account-id>:role/*.
Required IAM actions include iam:CreateRole, iam:PutRolePolicy, iam:PassRole, iam:TagRole, iam:UntagRole, iam:GetRole, iam:DeleteRole, and iam:DeleteRolePolicy.
Please make sure the policy applies to role/* resources, not only user/* resources.Quick checklist
Before retrying a failed AWS connection:
- Confirm you are in the correct AWS account.
- Confirm the failed stack rollback has finished.
- Confirm you have
iam:CreateRoleonarn:aws:iam::<account-id>:role/*. - Confirm you have
iam:TagRoleandiam:UntagRole. - Confirm you have Lambda creation permissions.
- Delete the failed stack if AWS left one behind.
- Start the Zynnode AWS connection flow again.
Quickstart
Deploy your first application with Zynnode in minutes — connect GitHub, link a cloud provider, set environment variables, configure a custom domain, and go live.
Connecting Cloudflare
Link your Cloudflare account to Zynnode using an API token so Zynnode can deploy your static sites and apps to Cloudflare Pages automatically on every push.