Giter VIP home page Giter VIP logo

aws-data-exchange-publisher-coordinator's Introduction

Deprecation Notice

This AWS Solution has been archived and is no longer maintained by AWS. To discover other solutions, please visit the AWS Solutions Library.

aws-data-exchange-publisher-coordinator

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.

Contributions

Rearc Logo

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].

Prerequisites

You should have:

  1. An AWS Data Exchange product and data set created.
  2. Three existing S3 buckets:
    • AssetBucket: For uploading the assets
    • ManifestBucketLoggingBucket: For logging activities
    • SourceCodeBucket: For uploading the Lambda code
  3. Python 3.8+
  4. AWS CLI
  5. AWS SAM CLI (separate from above)

Deployment

The following goes through local deployment. You may also follow the Publisher Coordinator lab to deploy the solution via AWS Cloud9.

Modify the CloudFormation template with your bucket names

  • Clone the repository, and update the below four configuration blocks in template.yaml in the source 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

Building and deploying the CloudFormation template

  • 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

Note

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.

aws-data-exchange-publisher-coordinator's People

Contributors

amazon-auto avatar chloegc-aws avatar chmarsaws avatar dbarrundiag avatar dependabot[bot] avatar justinbchan avatar kwwaikar avatar m4rd3n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aws-data-exchange-publisher-coordinator's Issues

error when there are more than 100 items in the s3 bucket

started getting this error after the s3 bucket grew to more than 100 files.
is there a work around to this?

[ERROR] ValidationException: An error occurred (ValidationException) when calling the CreateJob operation: The following parameter(s) are not valid: "Details.ImportAssetsFromS3.AssetSources" must contain less than or equal to 100 items.
Traceback (most recent call last):
  File "/var/task/app.py", line 101, in lambda_handler
    raise e
  File "/var/task/app.py", line 69, in lambda_handler
    jobresponse = dataexchange.create_job(Type='IMPORT_ASSETS_FROM_S3',Details=revisiondetails)
  File "/var/runtime/botocore/client.py", line 391, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/var/runtime/botocore/client.py", line 719, in _make_api_call
    raise error_class(parsed_response, operation_name)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.