読むのは公式、コピーも公式から

よくよく考えてみるとGit勉強しなおしたのはお仕事に関連してなので CodeCommitとGitが重要。なのでSaplingやめてこっちへ。
以下、失敗の記録です。

  • configファイルに設定するユーザーは鍵のID
  • configファイルに設定する内容は公式の通り
    configに書いてあった他のSSHからコピーするな!

docs.aws.amazon.com

教訓:

疲れた休憩する。そのまま実行すると集中力が落ちてこうなる。

忘れちゃうので

基本はココに書いてある通りやってます。

Server側は以下の通り。

#オフィシャルサイトでパッケージをDL後にDLしたディレクトリで
sudo apt install -y ./sapling_0.1.20221118-210929-cfbb68aa_amd64.Ubuntu20.04.deb

クライアント側こっちをやった。
名前とアドレスの設定こっち

#githubからclone
sl clone https://github.com/facebook/sapling
remote: Enumerating objects: 673403, done.
remote: Counting objects: 100% (1362/1362), done.
remote: Compressing objects: 100% (640/640), done.
remote: Total 673403 (delta 705), reused 1295 (delta 681), pack-reused 672041
Receiving objects: 100% (673403/673403), 172.67 MiB | 23.00 MiB/s, done.
Resolving deltas: 100% (451978/451978), done.
From https://github.com/facebook/sapling
 * [new ref]               4167fa03efeb89ef18acd669caffcebe9740cf33 -> remote/main
6516 files updated, 0 files merged, 0 files removed, 0 files unresolved

#状態を見てみる
sl
@  4167fa03e  67 minutes ago  rajshar  remote/main
│  Rename module from lib to library
~
touch hello.txt
echo 'Hello, World !' > hello.txt

#ステージングしていないので?が付いてる。?って何?
sl status
? hello.txt

#ステージングするとAに変わってる。addのAなのかな?
sl add hello.txt
sl status
A hello.txt

#コミットするとにゅるっとなったw
sl commit -m 'my first commit w/ Sapling'
sl
  @  0ad076b14  6 seconds ago  ouraboros
╭─╯  my first commit w/ Sapling
│
o  4167fa03e  71 minutes ago  remote/main
│
~

続きは明日。寝ます、おやすみなさい🌙

今日やったのはコレ

面白かった。でもコードの部分を理解せず貼ってしまった箇所があるので、明日またやろう。

aws.amazon.com

こっちは実装結果

lambdaのメモ

#pipをupdate
pip3 install -U pip
#t オプションはディレクトを指定。ここではカレントを指定
pip install requests_oauthlib -t ./
#rオプションはディレクトリ内のファイルを再帰的に扱う
zip -r twitter-bot-hello.zip ./
#コードをアップデートし名称は”twitter-bot-hello” filebって何?
aws lambda update-function-code --function-name twitter-bot-hello --zip-file fileb://twitter-bot-hello.zip

わ~い、出来た出来た、って当たり前だね。でも出来たからOK!