Skip to content

Add weathertop instructions. #4552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .doc_gen/metadata/cross_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -516,34 +516,3 @@ cross_LambdaForBrowser:
services:
lambda:
dynamodb:
cross_ShortLivedEmrCluster:
title: Create a short-lived &EMR; cluster and run a step using an &AWS; SDK
title_abbrev: Create a short-lived &EMR; cluster and run a step
synopsis: create a short-lived &EMR; cluster that runs a step and automatically
terminates after the step completes.
languages:
Python:
versions:
- sdk_version: 3
github: python/example_code/emr
block_content: cross_EmrShortLivedCluster_Python_block.xml
services:
ec2:
emr:
iam:
s3:
cross_LongLivedEmrCluster:
title: Create a long-lived &EMR; cluster and run steps using an &AWS; SDK
title_abbrev: Create a long-lived &EMR; cluster and run steps
synopsis: create a long-lived &EMR; cluster and run several steps.
languages:
Python:
versions:
- sdk_version: 3
github: python/example_code/emr
block_content: cross_EmrLongLivedCluster_Python_block.xml
services:
ec2:
emr:
iam:
s3:
4 changes: 2 additions & 2 deletions javav2/example_code/lookoutvision/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.0-rc1</version>
<version>2.13.4.2</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand All @@ -89,7 +89,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.4.1</version>
<version>2.13.4.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
Expand Down
8 changes: 3 additions & 5 deletions resources/cdk/photo_asset_manager/SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,9 @@ Each language will implement these Lambda functions. These functions handle the
|Function |Trigger |Input example |Output example |Uses |
|--- |--- |--- |--- |--- |
|Upload|APIG PUT /upload |{"file_name": "maintain01.jpg"} |{"url": "<presigned URL>"} |`StorageBucket` |
|DetectLabels|S3 PutObject jpeg | | |`StorageBucket`
`LabelsTable` |
|DetectLabels|S3 PutObject jpeg | | |`StorageBucket`, `LabelsTable` |
|LabelsFn|APIG GET /labels | |{"labels": {"maintain": {"count": 5}, "lake": {"count": 3}}} |`LabelsTable` |
|PrepareDownload|APIG POST /download (event) |{"labels": ["Mountain", "Lake"]} |{} |`LabelsTable`
`WorkingBucket` |
|PrepareDownload|APIG POST /download (event) |{"labels": ["Mountain", "Lake"]} |{} |`LabelsTable`, `WorkingBucket` |

**TIP**: The Java Lambdas were created during the building of this document. Refer to them for implementation insight.

Expand Down Expand Up @@ -208,4 +206,4 @@ Each implementation will include a README describing the language-specific detai
* `sns:Publish` on `arn:aws:sns:{REGION}:{ACCOUNT_ID}/{NAME}-SDKCodeExamplePAM-*`.

## Appendix B - Lambda triggers
* Storage bucket [OBJECT_CREATED] - When the user uploads a *.jpg/*.jpeg to the presigned URL in the storage bucket, the DetectLabelsFn function is invoked.
* Storage bucket [OBJECT_CREATED] - When the user uploads a *.jpg/*.jpeg to the presigned URL in the storage bucket, the DetectLabelsFn function is invoked.
6 changes: 3 additions & 3 deletions ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
cli-ui (2.1.0)
concurrent-ruby (1.2.2)
date (3.2.2)
date (3.3.3)
diff-lcs (1.5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -1428,12 +1428,12 @@ GEM
tilt (~> 2.0)
stringio (3.0.2)
tilt (2.0.11)
time (0.2.0)
time (0.2.2)
date
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
uri (0.11.0)
uri (0.12.1)
zip (2.0.2)

PLATFORMS
Expand Down
8 changes: 8 additions & 0 deletions rust_dev_preview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,23 @@ The following environment variables are specific to the AWS SDK for Rust.

You must have an AWS account, and have configured your default credentials and AWS Region as described in [Getting started with the AWS SDK for Rust](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/getting-started.html).

You must have the [Cargo](https://doc.rust-lang.org/cargo/) build tool, which is typically installed via [rustup](https://rustup.rs/).

Each example has one or more examples that can be executed with `cargo run --bin [program name]`.
See the individual readme files in each service directory for information about specific code examples for that service.

Unit tests for each example can be run with `cargo test`, and these will not cause any changes or charges to your AWS account.
Integration tests may cause changes or charges to your AWS account, and are described individually for each example.
However, they can be run with `cargo test -- --ignored`.

## Resources

- [AWS SDK for Rust repo](https://github.com/awslabs/aws-sdk-rust)
- [AWS SDK for Rust API Reference](https://docs.rs/releases/search?query=aws-sdk-)
- [AWS SDK for Rust Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg)

## Docker image (Beta)

This example code will soon be available in a container image
hosted on [Amazon Elastic Container Registry (ECR)](https://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html). This image will be pre-loaded
with all Rust examples with dependencies pre-resolved, allowing you to explore
Expand Down
8 changes: 4 additions & 4 deletions rust_dev_preview/apigateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-sdk-apigateway = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-smithy-types-convert = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next", features = [
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-sdk-apigateway = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-smithy-types-convert = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main", features = [
"convert-chrono",
] }
structopt = { version = "0.3", default-features = false }
clap = { version = "4.2.1", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
6 changes: 3 additions & 3 deletions rust_dev_preview/apigateway/src/bin/get_rest_apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use aws_config::meta::region::RegionProviderChain;
use aws_sdk_apigateway::error::DisplayErrorContext;
use aws_sdk_apigateway::{config::Region, meta::PKG_VERSION, Client};
use aws_smithy_types_convert::date_time::DateTimeExt;
use clap::Parser;
use std::process;
use structopt::StructOpt;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The AWS Region.
#[structopt(short, long)]
Expand Down Expand Up @@ -57,7 +57,7 @@ async fn show_apis(client: &Client) -> Result<(), Error> {
async fn main() {
tracing_subscriber::fmt::init();

if let Err(err) = run_example(Opt::from_args()).await {
if let Err(err) = run_example(Opt::parse()).await {
eprintln!("Error: {}", DisplayErrorContext(err));
process::exit(1);
}
Expand Down
6 changes: 3 additions & 3 deletions rust_dev_preview/apigatewaymanagement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-sdk-apigatewaymanagement = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-sdk-apigatewaymanagement = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
http = "0.2.5"
tokio = { version = "1.20.1", features = ["full"] }
structopt = { version = "0.3", default-features = false }
clap = { version = "4.2.1", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_apigatewaymanagement::primitives::Blob;
use aws_sdk_apigatewaymanagement::{config, config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
/// AWS apigatewaymanagenent must be used with a custom endpoint, which this example demonstrates how to set.
///
/// Usage:
Expand Down Expand Up @@ -83,7 +83,7 @@ async fn main() -> Result<(), Error> {
stage,
connection_id,
data,
} = Opt::from_args();
} = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
6 changes: 3 additions & 3 deletions rust_dev_preview/applicationautoscaling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-sdk-applicationautoscaling = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-sdk-applicationautoscaling = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
tokio = { version = "1.20.1", features = ["full"] }
structopt = { version = "0.3", default-features = false }
clap = { version = "4.2.1", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_applicationautoscaling::types::ServiceNamespace;
use aws_sdk_applicationautoscaling::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The AWS Region.
#[structopt(short, long)]
Expand Down Expand Up @@ -52,7 +52,7 @@ async fn show_policies(client: &Client) -> Result<(), Error> {
async fn main() -> Result<(), Error> {
tracing_subscriber::fmt::init();

let Opt { region, verbose } = Opt::from_args();
let Opt { region, verbose } = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
6 changes: 3 additions & 3 deletions rust_dev_preview/autoscaling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-sdk-autoscaling = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-sdk-autoscaling = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
tokio = { version = "1.20.1", features = ["full"] }
structopt = { version = "0.3", default-features = false }
clap = { version = "4.2.1", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The name of the Amazon EC2 Auto Scaling group.
#[structopt(short, long)]
Expand Down Expand Up @@ -64,7 +64,7 @@ async fn main() -> Result<(), Error> {
instance_id,
region,
verbose,
} = Opt::from_args();
} = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The name of the Amazon EC2 Auto Scaling group.
#[structopt(short, long)]
Expand Down Expand Up @@ -62,7 +62,7 @@ async fn main() -> Result<(), Error> {
force,
region,
verbose,
} = Opt::from_args();
} = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The AWS Region.
#[structopt(short, long)]
Expand Down Expand Up @@ -57,7 +57,7 @@ async fn list_groups(client: &Client) -> Result<(), Error> {
async fn main() -> Result<(), Error> {
tracing_subscriber::fmt::init();

let Opt { region, verbose } = Opt::from_args();
let Opt { region, verbose } = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The name of the Amazon EC2 Auto Scaling group.
#[structopt(short, long)]
Expand Down Expand Up @@ -62,7 +62,7 @@ async fn main() -> Result<(), Error> {
max_size,
region,
verbose,
} = Opt::from_args();
} = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
8 changes: 4 additions & 4 deletions rust_dev_preview/autoscalingplans/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-sdk-autoscalingplans = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-types = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-sdk-autoscalingplans = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-types = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
tokio = { version = "1.20.1", features = ["full"] }
structopt = { version = "0.3", default-features = false }
clap = { version = "4.2.1", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscalingplans::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The region
#[structopt(short, long)]
Expand Down Expand Up @@ -47,7 +47,7 @@ async fn list_plans(client: &Client) -> Result<(), Error> {
async fn main() -> Result<(), Error> {
tracing_subscriber::fmt::init();

let Opt { region, verbose } = Opt::from_args();
let Opt { region, verbose } = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
6 changes: 3 additions & 3 deletions rust_dev_preview/batch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-sdk-batch = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "next" }
aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
aws-sdk-batch = { git = "https://github.com/awslabs/aws-sdk-rust", branch = "main" }
tokio = { version = "1.20.1", features = ["full"] }
structopt = { version = "0.3", default-features = false }
clap = { version = "4.2.1", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
6 changes: 3 additions & 3 deletions rust_dev_preview/batch/src/bin/batch-helloworld.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

use aws_config::meta::region::RegionProviderChain;
use aws_sdk_batch::{config::Region, meta::PKG_VERSION, Client, Error};
use structopt::StructOpt;
use clap::Parser;

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
struct Opt {
/// The AWS Region.
#[structopt(short, long)]
Expand Down Expand Up @@ -50,7 +50,7 @@ async fn show_envs(client: &Client) -> Result<(), Error> {
#[tokio::main]
async fn main() -> Result<(), Error> {
tracing_subscriber::fmt::init();
let Opt { region, verbose } = Opt::from_args();
let Opt { region, verbose } = Opt::parse();

let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
Expand Down
Loading