This file contains 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
import awsLite from '@aws-lite/client' | |
const aws = await awsLite() | |
await aws.CloudFront.CreateInvalidation({ | |
CallerReference: Date.now()+'', | |
Id: 'xxx', | |
InvalidationBatch: '/*', | |
}) |
This file contains 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Transform": "AWS::Serverless-2016-10-31", | |
"Description": "Exported by architect/package@9.0.0-RC.1 on 2024-03-13T16:59:13.480Z", | |
"Resources": { | |
"Role": { | |
"Type": "AWS::IAM::Role", | |
"Properties": { | |
"AssumeRolePolicyDocument": { | |
"Version": "2012-10-17", |
This file contains 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
<!-- describing what I want --> | |
<my-apple></my-apple> |
This file contains 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
/** | |
* put this file in src/plugins/ and add the following to the arcfile: | |
* | |
* @plugins | |
* fix-s3 | |
*/ | |
module.exports = { deploy: { start }} | |
async function start ({ arc, cloudformation }) { | |
let ref = cloudformation.Resources.StaticBucket.Properties |
This file contains 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
In the year 2256, the San Francisco Bay Area Rapid Transit system, known simply as the SF BART, was still a vital part of daily life in the bustling city. Despite the many societal upheavals and wars that had threatened to destroy it, the SF BART had managed to survive and thrive, providing reliable transportation to millions of inhabitants. | |
The key to the SF BART's success was its adaptability and resilience. When a massive earthquake devastated San Francisco in the early 22nd century, the BART system was able to quickly repair and rebuild, thanks in part to its strong infrastructure and robust emergency protocols. When the city faced a major food shortage, the BART's efficient transportation network allowed for the swift distribution of resources, ensuring that no one went hungry. | |
But the SF BART's greatest challenge came during the Romulan War. As the war raged on, the city of San Francisco was subjected to numerous bombing raids and ground assaults. The SF BART faced significant damage, but the dedicate |
This file contains 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
Nov 16th 2022, 03:46:08 PM | |
REPORT RequestId: f949935c-0f0e-4718-9976-9df42585adb5 Duration: 2.05 ms Billed Duration: 3 ms Memory Size: 1152 MB Max Memory Used: 76 MB | |
Nov 16th 2022, 03:46:04 PM | |
REPORT RequestId: 89ba7dfa-72d1-4ad7-9dac-2214d1698697 Duration: 4.42 ms Billed Duration: 338 ms Memory Size: 1152 MB Max Memory Used: 75 MB Init Duration: 333.05 ms |
This file contains 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
/** | |
* this incantation will set the HttpApi response payload | |
* format to 1.0 which enables multiple headers | |
* https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.response | |
*/ | |
module.exports = { | |
deploy: { | |
async start ({ arc, cloudformation }) { | |
if (!arc) console.log('missing arc') | |
let base = cloudformation.Resources.HTTP.Properties.DefinitionBody.paths['/'] |
This file contains 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
import arc from '@architect/functions' | |
// send an event to the SNS topic named 'ping' | |
// … under the hood the ARN is arn:aws:sns:us-west-2:818138539153:appname-ping-Q1C4HOR7RT2H:6bd207a6-4aaf-4015-bad4-a30adf7944f | |
await arc.events.publish({ | |
name: 'ping', | |
payload: { pingID: Date.now() } | |
}) | |
// read from the db table named 'pings' |
This file contains 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
let aws = require('aws-sdk') | |
module.exports = { | |
CloudFormation: aws.CloudFormation, | |
ApiGatewayV2: aws.ApiGatewayV2, | |
ACM: aws.ACM, | |
Route53: aws.Route53, | |
} |
This file contains 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
> @architect/architect@9.5.1 test:unit | |
> cross-env tape 'test/unit/**/*-test.js' | |
TAP version 13 | |
# Core Architect packages and necessary CLI interfaces are present | |
ok 1 create found | |
ok 2 create CLI found | |
ok 3 deploy found | |
ok 4 deploy CLI found |
NewerOlder