This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Cognito user pool/auth setup | |
| # | |
| Resources: | |
| MyAppUserPool: | |
| Type: AWS::Cognito::UserPool | |
| Properties: | |
| UserPoolName: myapp_user_pool | |
| UsernameAttributes: # use email as username/login | |
| - 'email' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| functions: | |
| myfunc: | |
| handler: bin/myhandler | |
| events: | |
| - http: | |
| path: myapipath | |
| method: get | |
| authorizer: | |
| type: COGNITO_USER_POOLS | |
| authorizerId: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "event": [ | |
| { | |
| "time": "2020-06-16T15:22:33Z", | |
| "lng": -122.03053391, | |
| "lat": 37.33180957, | |
| "uuid": "96a6f48c-fe67-4cad-be24-21d6523137f6", | |
| "sensor_name": "CYT523", | |
| "reading_value": 72.9, | |
| "is_active": true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RequestTemplates: | |
| application/json: | | |
| #set($inputRoot = $input.path('$')) | |
| { | |
| "RequestItems": { | |
| "${self:resources.Resources.EventsTable.Properties.TableName}": [ | |
| #foreach($event in $inputRoot.event) | |
| { | |
| "PutRequest": { | |
| "Item": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: my-api | |
| org: CompanyName | |
| # You can pin your service to only deploy with a specific Serverless version | |
| # Check out our docs for more details | |
| # frameworkVersion: "=X.X.X" | |
| frameworkVersion: '>=2.1.1 <3.0.0' | |
| custom: | |
| defaultStage: dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| custom: | |
| scripts: | |
| commands: | |
| smoke-test-dev: "echo 'activating dev serverless DB and running dev smoke test...'; curl --request GET 'https://YOUR-API-URL' > /dev/null 2>&1; sleep 30; npm run test-dev" | |
| smoke-test-production: "echo 'running production smoke test...'; npm run test-production" | |
| hooks: | |
| 'after:deploy:finalize': ${self:custom.scripts.commands.smoke-test-${self:provider.stage}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Amplify Branch URL notifications | |
| on: | |
| create: | |
| pull_request: | |
| types: [opened] | |
| jobs: | |
| add_url_comment: | |
| name: Add Amplify deploy URL to PR comments and Slack | |
| runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sess = boto3.session.Session(profile_name='mycompany_somerole_devaccount') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sess := session.Must(session.NewSessionWithOptions(session.Options{ | |
| Profile: "mycompany_somerole_devaccount", | |
| SharedConfigState: session.SharedConfigEnable, | |
| })) |