This component is simply a template to get started. It will create a s3 bucket and remove an s3 bucket.
If you're looking to learn how to build serverless components take a look at this Walk through tutorial.
$ npm install -g serverless
Just create a serverless.yml
file
$ touch serverless.yml
$ touch .env
the .env
files should look like this.
AWS_ACCESS_KEY_ID=XXX
AWS_SECRET_ACCESS_KEY=XXX
# serverless.yml
component: sample-component # The name of the Component in the Registry
org: example-org # Your Serverless Framework Org
app: example-app # Your Serverless Framework App
name: sample-component-sg # The name of your instance of this Component
stage: dev
inputs:
bucket: ${app}-${name}-${stage} # dynamic naming
Inputs can contain the following properties:
bucket
[required]. the name of the bucket
$ sls deploy --debug
Checkout the Serverless Components repo for more information.