This AWS Solution has been archived and is no longer maintained by AWS. To discover other solutions, please visit the AWS Solutions Library.
This package sets up Lambda functions (via CloudFormation) to automatically execute the publication steps for new dataset revisions. Execution is triggered when an S3 manifest file for a new revision is uploaded to the S3 Manifest Bucket this package will create.
Significant contributions to this GitHub repository were made by Rearc. We'd like to thank Rearc for their work. Rearc offers further customizations to publisher-coordinator, as well as a fully managed AWS Data Exchange publishing solution. For more information you can reach Rearc at [email protected].
You should have:
- An AWS Data Exchange product and data set created.
- Three existing S3 buckets:
- AssetBucket: For uploading the assets
- ManifestBucketLoggingBucket: For logging activities
- SourceCodeBucket: For uploading the Lambda code
- Python 3.8+
- AWS CLI
- AWS SAM CLI (separate from above)
The following goes through local deployment. You may also follow the Publisher Coordinator lab to deploy the solution via AWS Cloud9.
- Clone the repository, and update the below four configuration blocks in
template.yaml
in thesource
subdirectory. - In the template snippet below, the
ManifestBucket
parameter sets the name of the bucket to be created by CloudFormation. The other two bucket names are from the preexisting buckets above. - Create a
local
folder in the project directory to store the CloudFormation template output created by the Serverless Application Model (SAM) build.
Parameters:
ManifestBucket:
Type: String
Default: 'my-test-manifest-bucket' // Name of the new bucket that will be created in this solution
Description: S3 Bucket name where .manifest files will be stored
AssetBucket:
Type: String
Default: 'my-asset-bucket-publisher-test' // Name of the existing bucket where new assets are added
Description: Bucket containing assets and referenced in the manifest.
ManifestBucketLoggingBucket:
Type: String
Default: 'my-test-manifest-logging-bucket' // Name of the existing bucket where activity logs will be saved
Description: Bucket to store server access logs associated with the manifest bucket
ManifestBucketLoggingPrefix:
Type: String
Default: 'my-publisher-coordinator-logs/' // Prefix string (including the trailing slash)
Description: Prefix location for server access logs associated with the manifest bucket
- Set environment variables:
export SOLUTION_NAME=my-solution-name
export VERSION=my-version # version number for the customized code
export CFN_CODE_BUCKET=my-bucket-name # bucket where customized code will reside
Note: It is recommended to include the aws region in your bucket name, e.g. my-bucket-name-<aws_region>
. Also, the assets in bucket should be publicly accessible.
- Package and upload the Lambda code. From within the
deployment
directory:
chmod +x ./package-codes-for-upload.sh
./package-codes-for-upload.sh $SOLUTION_NAME $VERSION $CFN_CODE_BUCKET
- Use AWS SAM to build and deploy the CloudFormation template. From within the
source
directory:
sam build
sam package --s3-bucket $CFN_CODE_BUCKET \
--output-template-file ../local/aws-data-exchange-publisher-coordinator-SAM.template
sam deploy --template-file ../local/aws-data-exchange-publisher-coordinator-SAM.template \
--region <Region> --stack-name <StackName> --capabilities CAPABILITY_IAM
This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the implementation guide.