Deployment template aws


Table of Inputs:

regionRequiredRegion name for the cluster.
ecr_roleRequiredRole to pull image from private ECR.
instance_roleOptionalRole to be used by App Runner to interact with other AWS services.
memoryOptionalMemory to be consumed by App Runner.
cpuOptionalCPU to be consumed by App Runner.
vpc_connector_arnOptionalARN for a connector to a specific VPC.
is_publicOptionalShould this service be exposed to public network.
portRequiredContainer port.

The deployment template itself is a configuration file for AWS App Runner. It specifies various parameters and settings for deploying an application using App Runner. Here's a summary of what is happening in the deployment template:

  • The template defines metadata such as the provisioner, name, version, author, and description.
  • It specifies the input artifacts and their properties required for the deployment.
  • The template includes a script for creating a JSON configuration file for source and instance configurations.
  • It sets some variables and generates a service name based on the provided inputs.
  • The template has different phases: install and build.
  • In the install phase, the AWS region is configured.
  • In the build phase, there is a conditional statement based on the job type (deploy or undeploy).
  • If the job type is "deploy," the script performs the following actions:
    • It creates an env.json file that contains runtime environment variables based on the provided pipeline environment file.
    • It deletes any existing secrets related to the service.
    • It creates a env_secrets.json file that contains secrets retrieved from the pipeline secret file. The secrets are stored in AWS Secrets Manager, and the ARNs are added to the JSON file.
    • It generates a JSON configuration file named app.json based on the provided inputs, including the repository, tag, port, and environment variables/secrets.
    • It generates an instance.json file for instance configuration, including CPU and memory specifications.
    • It generates a network.json file for network configuration, including ingress/egress settings.
    • It checks if the service already exists and either creates or updates the service accordingly using AWS App Runner.
    • The service URL is captured and added as an output.
  • If the job type is not "deploy," it deletes the App Runner service based on the service name.

Overall, the deployment template is used to deploy an application using AWS App Runner, and it handles environment variables, secrets, instance configuration, network configuration, and service creation/update based on the specified inputs.


Table of Inputs:

portsAn array of objects describing the ports used in services.
ingressAn array of objects describing the ingress details.
clusterThe name of the cluster in which the deployment will happen.
regionThe region name for the cluster.
roleArnThe role for deployment in EKS.
app_envApplication-related environments (object).
filesFiles mounted in the container (object).
repositoryContainer repository URL without tag.
tagContainer tag.
applicationNameApplication name.
environmentEnvironment name.
projectProject name.
customer_bucketCustomer bucket name.
job_typeJob type (deploy or undeploy application).
deployment_timeoutTime to wait for pods to be ready before terminating deployment as unsuccessful.

The provided YAML script describes an EKS (Elastic Kubernetes Service) deployment configuration. It includes inputs and a deployment template written in bash script. The deployment template utilizes Helm for managing Kubernetes resources. The script performs actions such as installing Helm, configuring the Kubernetes context, retrieving input values, generating a Helm values.yaml file, deploying the application, and retrieving the service URL.


regionRequiredRegion name for lambda deployment.
app_envOptionalApplication environment variables.
memoryOptionalMemory in MB, default 1024MB.
timeoutOptionalTimeout in seconds, default 10 seconds.
applicationNameOptionalA Code Pipes application name.
environmentOptionalA Code Pipes environment name.
architectureOptionalProcessor architecture x86_64 or arm64, default x86_64.
bucketRequiredS3 bucket to hold serverless state file.
runtimeRequiredApplication runtime.
repo_dirOptionalRepo Dir.
funcsRequiredFunction configuration.
job_typeOptionalThis is to deploy or undeploy application.

This deployment template is designed to provision AWS Lambda functions with API Gateway using the Serverless framework. It utilizes the AWS provisioner and includes configurations for various deployment parameters. The template allows for deploying or undeploying applications based on the specified job type.

The template includes the following main sections:

  1. Meta Information: Contains details such as the provisioner, version, revision, display name, description, target, keywords, and author of the template.

  2. Inputs: Defines the input variables required for the deployment. These include the region name, application environment variables, memory size, timeout, application name, environment name, processor architecture, S3 bucket for storing state, runtime, repository directory, function configurations, and job type.

  3. Template: This section contains the actual deployment template written using the Jinja2 templating language. It starts with some variable assignments and configurations. Then it defines the phases of the deployment, including installation and build. The build phase generates a serverless.yml file based on the input variables and deploys the Lambda functions using the Serverless framework. The actual deployment or undeployment commands are executed based on the job type specified.

The deployment template allows for customization and automation of the deployment process for AWS Lambda functions with API Gateway.