Package: aws-syndicate
Syndicateaws-syndicate is an Amazon Web Services deployment framework written in Python,
which allows to easily deploy serverless applications using resource
descriptions.ChangelogSee CHANGELOG here1. Installation1.1 Installation from PyPIInstall aws-syndicate from PyPI1.2 Installation from source code1.2.1 PrerequisitesPython 3.7or
higher version;Package managerPIP 9.0or higher version;Apache Maven 3.3.9or higher version (for Java projects).1.2.2 Installation on macOSDetailed guide how to install Python you can findhere.
Alsohereyou can find detailed guild how to install
thelatest Apache Maven.Pull the projectgitclonehttps://github.com/epam/aws-syndicate.gitCreate virtual environment:python3-mvenvsyndicate_venvActivate your virtual environment:sourcesyndicate_venv/bin/activateInstall Syndicate framework with pip from GitHub:pip3installaws-syndicate/.Set up a Syndicate Javaplugin:mvninstall-faws-syndicate/plugin/Go to the2. Usage guide1.2.2 Installation on LinuxDetailed guide how to install Python you can
findhere.
Alsohereyou can find detailed guild how to install
thelatest Apache Maven.Pull the projectgitclonehttps://github.com/epam/aws-syndicate.gitCreate virtual environment:python3-mvenvsyndicate_venvActivate your virtual environment:sourcesyndicate_venv/bin/activateInstall Syndicate framework with pip from GitHub:pip3installaws-syndicate/.Set up a Syndicate Javaplugin:mvninstall-faws-syndicate/plugin/Go to the2. Usage guide1.2.3 Installation on WindowsDetailed guide how to install Python you can
findhere.
Alsohereyou can find detailed guild how to install
thelatest Apache Maven.Pull the projectgitclonehttps://github.com/epam/aws-syndicate.gitCreate virtual environment:python3-mvenvsyndicate_venvActivate your virtual environment:syndicate_venv\Scripts\activate.batInstall Syndicate framework with pip from GitHub:pip3installaws-syndicate/.Set up a Syndicate Javaplugin:mvninstall-faws-syndicate/plugin/Go to the2. Usage guide2. Usage guide2.1 Creating Project filesExecutesyndicate generate projectcommand to generate the project with all the
necessary components and in a right folders/files hierarchy to start developing
in a min. Command example:syndicategenerateproject--name$project_name--config_path$path_to_projectAll the provided information is validated. After the project folder will be
generated the command will return the following message:Projectname:$project_nameProjectpath:$path_to_projectThe following files will be created in this folder: .gitignore, .syndicate,
CHANGELOG.md, deployment_resources.json, README.md.Command sample:syndicategenerateproject--nameDemoSyndicateJava&&cdDemoSyndicateJavaFor more details please executesyndicate generate project --help2.2 Creating configuration files for environmentExecute thesyndicate generate configcommand to create Syndicate configuration
files. Command example:syndicategenerateconfig--name$configuration_name[required]--region$region_name[required]--bundle_bucket_name$s3_bucket_name[required]--access_key$access_key[required]--secret_key$secret_key[required]--config_path$path_to_store_config--project_path$relative_path_to_project--prefix$prefix--suffix$suffix--use_temp_creds$use_temp_creds#Specify,if use mfa or access_role--access_role$role_name--serial_number$serial_number--tags$KEY:VALUE--iam_permissions_boundary$ARN--session_token$aws_session_tokenAll the provided information is validated.Note:you may not specify--access_keyand--secret_keyparams. It this
case Syndicate will try to find your credentials by the path~/.aws.Note:You can force Syndicate to generate temporary credentials and use them
for deployment. For such cases, setuse_temp_credsparameter toTrueand
specify serial number if IAM user which will be used for deployment has a policy
that requires MFA authentication. Syndicate will prompt you to enter MFA code to
generate new credentials, save and use them until expiration.After the configuration files will be generated the command will return the
following message:Syndicateinitializationhasbeencompleted.SetSDCT_CONF:Unix:exportSDCT_CONF=$path_to_store_configWindows:setxSDCT_CONF$path_to_store_configJust copy one of the last two lines, depending on your OS, and execute the
command. The commands set the environment variable SDCT_CONF required by
aws-syndicate to operate.Pay attention that the default syndicate_aliases.yaml file has been generated.
Your application may require additional aliases to be deployed - please add them to the file.Command sample:SYNDICATE_AWS_ACCESS_KEY=# enter your aws_access_key_id hereSYNDICATE_AWS_SECRET_KEY=# enter your aws_secret_access_key heresyndicategenerateconfig--namedev--regioneu-central-1--bundle_bucket_namesyndicate-artifacts-eu-central-1--access_key$SYNDICATE_AWS_ACCESS_KEY--secret_key$SYNDICATE_AWS_SECRET_KEY--config_path$(pwd)--prefixsyn---suffix-dev--tagsENV:DEVFor more details please executesyndicate generate config --helpNote:You can find a detailed structure of the syndicate.yml filehere2.3 Creating lambda filesExecutesyndicate generate lambdacommand to generate required environment for
lambda function except business logic. Command example:syndicategeneratelambda--name$lambda_name_1--runtimepython|java|nodejs--project_path$project_pathAll the provided information is validated. Different environments will be
created for different runtimes:for Python.
    ├── $project_path
    │   └── src
    │       ├── commons
    │       │   ├── __init__.py
    │       │   ├── abstract_lambda.py
    │       │   ├── exception.py
    │       │   └── log_helper.py
    │       └── lambdas
    │           ├── $lambda_name_1
    │           │   ├── __init__.py
    │           │   ├── deployment_resources.json
    │           │   ├── handler.py
    │           │   ├── lambda_config.json
    │           │   ├── local_requirements.txt
    │           │   └── requirements.txt
    │           ├── $lambda_name_2
    │           │   ├── __init__.py
    │           │   ├── deployment_resources.json
    │           │   ├── handler.py
    │           │   ├── lambda_config.json
    │           │   ├── local_requirements.txt
    │           │   └── requirements.txt
    │           ├── __init__.py
    │           └── ...
    └── ...for Java.
    ├── $project_path
    │   └── jsrc
    │       └── main
    │           └── java
    │               └── com
    │                   └── $projectpath
    │                       ├── $lambda_name_1.java
    │                       └── $lambda_name_2.java
    └── ...for NodeJS.
    ├── $project_path
    │   └── app
    │       └── lambdas
    │           ├── $lambda_name_1
    │           │   ├── deployment_resources.json
    │           │   ├── lambda_config.json
    │           │   ├── index.js
    │           │   ├── package.json
    │           │   └── package-lock.json
    │           └── $lambda_name_2
    │               ├── deployment_resources.json
    │               ├── lambda_config.json
    │               ├── index.js
    │               ├── package.json
    │               └── package-lock.json
    └── ...Command sample:syndicategeneratelambda--nameDemoLambda--runtimejava--project_path$(pwd)For more details please executesyndicate generate lambda --help2.4 Add other infrastructure componentsThis step is optional and could be skipped while getting familiar with syndicate.All the resources syndicate works with could be generated in the same way as lambda.
Invoke thesyndicate generate meta --helpcommand to find out which resources are available.2.5 Open project in your IDENow the project is ready to be adjusted. Consider opening your favourite IDE and observe the files created by syndicate.3. Deployment3.1 Create an S3 bucket for aws-syndicate artifacts:syndicatecreate_deploy_target_bucket3.2 Build project artifactssyndicatebuild3.3 Deploy project resources to AWS accountsyndicatedeployNow the DemoLambda is created and available to be tested.3.4 Update resourcesIn order to be sure your latest changes works well on the AWS account the application should be deployed to the AWS account.
To do this use the following commands set:syndicatebuild
syndicateupdate3.5 Lambdas invocations metricssyndicateprofiler3.6 Clean up project resources from AWS Accountsyndicateclean3.7 Observing the environment manipulation historysyndicatestatus# this shows the general CLI dashboard where latest modification, locks state, latest event, project resources are shownsyndicatestatus--events# this returns all the history of what happened to the environment4. ExamplesIf you are just getting familiar with the functionality, you can use one of the
pre-prepared examples that contain a minimum set of AWS resources and lambdas.The aws-syndicate/examples folder contains structure examples for different
runtimes. Go to any example you like best and set the environment
variableSDCT_CONF=$path_to_the_selected_example.Add your account details tosdct.conf/syndicate.ymlfile - account id,
secret access key, access key and bucket name for deployment.
Tosdct_aliases.conf/syndicate_aliases.ymladd your account id, region
name (eu-central-1, us-west-1, etc.) and other values in the file that start
with a$sign.The demo application consists of the following infrastructure:2 IAM roles3 IAM policies1 DynamoDB table1 S3 bucket2 lambdas1 API GatewayDocumentationYou can find a detailed
documentationhereGetting HelpWe use GitHub issues for tracking bugs and feature requests. You can find our
public backloghere. If it
turns out that you may have found a bug,
pleaseopen an issuewith some of existing templates.Default label for bugs, improvements and feature requests isTo-Think-About,
it defines that ticket requires additional information about what should be done
in scope of this issue.To-Dolabel should be added only for tickets with clear and reviwed issue
scope.But before creating new issues - check existing, it may cover you problem or
question. For increasing issue priority - just add "+1" comment.Would like to contribute?Please,
checkcontributor guidebefore starting.